Exemple #1
0
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;
}
Exemple #2
0
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;
}