bool test(double x) { for(int i = 0; i < solver.m; i++) solver.edges[i].dist -= x; bool ret = solver.negativeCycle(); for(int i = 0; i < solver.m; i++) solver.edges[i].dist += x; return ret; }
bool test(int m) { for (int i=0;i<solver.m;i++) solver.edges[i].dist-=m; bool ret=solver.negativeCycle(); for (int i=0;i<solver.m;i++) solver.edges[i].dist+=m; return ret; }