예제 #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;
}
예제 #2
0
파일: 11478.cpp 프로젝트: wgjak47/ACM-UVA
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;
}