Submission #567670

# Submission time Handle Problem Language Result Execution time Memory
567670 2022-05-24T02:26:43 Z zaneyu Cop and Robber (BOI14_coprobber) C++14
0 / 100
0 ms 292 KB
#include "coprobber.h"
#define REP(i,n) for(int i=0;i<n;i++)
int start(int n, bool A[MAX_N][MAX_N])
{
    int c;
    REP(i,n) if(A[0][i]) c=i;
    int r=n/c;
    if(r==2 or c==2){
        return 0;
    } 
    return -1;
}

int nextMove(int R){
    if(R==3) return 0; 
    return R;
}

Compilation message

coprobber.cpp: In function 'int start(int, bool (*)[500])':
coprobber.cpp:8:17: warning: 'c' may be used uninitialized in this function [-Wmaybe-uninitialized]
    8 |     if(r==2 or c==2){
      |                ~^~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 208 KB Output is correct
2 Incorrect 0 ms 284 KB Cop can catch the robber, but start() returned -1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 208 KB Output is correct
2 Incorrect 0 ms 208 KB Cop can catch the robber, but start() returned -1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 208 KB Output is correct
2 Incorrect 0 ms 292 KB Cop can catch the robber, but start() returned -1
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 208 KB Output is correct
2 Incorrect 0 ms 284 KB Cop can catch the robber, but start() returned -1
3 Halted 0 ms 0 KB -