Submission #944032

# Submission time Handle Problem Language Result Execution time Memory
944032 2024-03-12T07:21:01 Z 12345678 Cop and Robber (BOI14_coprobber) C++17
0 / 100
1 ms 596 KB
#include "coprobber.h"

int start(int N, bool A[MAX_N][MAX_N])
{
    for (int i=0; i<N; i++) for (int j=0; j<N; j++) if (i!=j&&!A[i][j]) int a=1/0;
    return 0;
}

int nextMove(int R)
{
    return R;
}

Compilation message

coprobber.cpp: In function 'int start(int, bool (*)[500])':
coprobber.cpp:5:80: warning: division by zero [-Wdiv-by-zero]
    5 |     for (int i=0; i<N; i++) for (int j=0; j<N; j++) if (i!=j&&!A[i][j]) int a=1/0;
      |                                                                               ~^~
coprobber.cpp:5:77: warning: unused variable 'a' [-Wunused-variable]
    5 |     for (int i=0; i<N; i++) for (int j=0; j<N; j++) if (i!=j&&!A[i][j]) int a=1/0;
      |                                                                             ^
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Incorrect 0 ms 344 KB nextMove() returned a value that is either outside 0..N-1 or the new cop position is not a neighbour to the previous one
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 596 KB nextMove() returned a value that is either outside 0..N-1 or the new cop position is not a neighbour to the previous one
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Incorrect 0 ms 344 KB nextMove() returned a value that is either outside 0..N-1 or the new cop position is not a neighbour to the previous one
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Incorrect 0 ms 344 KB nextMove() returned a value that is either outside 0..N-1 or the new cop position is not a neighbour to the previous one
4 Halted 0 ms 0 KB -