Submission #107593

#TimeUsernameProblemLanguageResultExecution timeMemory
107593patrikpavic2Cop and Robber (BOI14_coprobber)C++17
0 / 100
2 ms384 KiB
#include "coprobber.h" #include <cstdio> #include <cstring> #include <algorithm> #include <vector> #include <set> #include <map> int mv = 0, pos; bool a[MAX_N][MAX_N]; int start(int N, bool A[MAX_N][MAX_N]){ int m = 0; while(A[m][m + 1]) m++;m++; int n = N / m; if(n <= 3 && m <= 3){ if(n == 3 && m == 3) return pos = 4; return pos = 1; } return -1; } int nextMove(int R){ if(a[R][pos]) return R; return pos; }

Compilation message (stderr)

coprobber.cpp: In function 'int start(int, bool (*)[500])':
coprobber.cpp:14:5: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
     while(A[m][m + 1]) m++;m++;
     ^~~~~
coprobber.cpp:14:28: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
     while(A[m][m + 1]) m++;m++;
                            ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...