Submission #608775

#TimeUsernameProblemLanguageResultExecution timeMemory
608775Duy_eMonster Game (JOI21_monster)C++17
0 / 100
248 ms300 KiB
#include "monster.h" using namespace std; const long long N = 2e2 + 5; int ans[N][N]; vector<int> Solve(int n) { vector<int> T(n); int pos1 = 0, pos2 = 0; for (int i = 0; i < n; i ++) { for (int j = 0; j < n; j ++) if (i != j) { ans[i][j] = Query(i, j); T[i] += ans[i][j]; } if (T[i] == 2) pos1 = i; if (T[i] == n - 2) pos2 = i; } for (int i = 0; i < n; i ++) { if (T[i] == 1) { if (!ans[i][pos1]) T[i] = 0; } if (T[i] == n - 2) { if (!ans[i][pos2]) T[i] = n - 1; } } return T; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...