#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 time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
208 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
208 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
248 ms |
300 KB |
Wrong Answer [6] |
2 |
Halted |
0 ms |
0 KB |
- |