Submission #1307405

#TimeUsernameProblemLanguageResultExecution timeMemory
1307405lucaskojimaCop and Robber (BOI14_coprobber)C++17
0 / 100
1 ms340 KiB
#include "bits/stdc++.h" #include "coprobber.h" #define sz(x) (int)size(x) #define all(x) begin(x), end(x) #define rall(x) rbegin(x), rend(x) using namespace std; using ll = long long; using pii = pair<int, int>; const char nl = '\n'; const int INF = 0x3f3f3f3f; const ll LINF = 0x3f3f3f3f3f3f3f3f; const int N = 500; int p, a[N][N]; int start(int N, bool A[MAX_N][MAX_N]) { for (int i = 0; i < N; i++) for (int j = 0; j < N; j++) a[i][j] = A[i][j]; int x = 0; while (A[x][x + 1]) x = x + 1; int m = x + 1; int n = N / m; if (n <= 3 && m <= 3) { if (n == 2 && m == 2) return p = 0; if (n == 3 && m == 2) return p = 3; if (n == 2 && m == 3) return p = 4; if (n == 3 && m == 3) return p = 4; } else { return -1; } } int nextMove(int R) { if (a[p][R]) return R; return p; }

Compilation message (stderr)

coprobber.cpp: In function 'int start(int, bool (*)[500])':
coprobber.cpp:42:1: warning: control reaches end of non-void function [-Wreturn-type]
   42 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...