#include "key.h"
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
bool ans[1005][1005];
int num[1005];
void EnsureKeyInfo(int N) {
for(int i = 1; i <= N; i++) {
TakeKey(i);
num[i] = Explore();
}
for(int i = 1; i <= N; i++) {
ans[i][i] = 1;
for(int j = i + 1; j <= N; j++) {
TakeKey(i); TakeKey(j);
int tmp = Explore();
if(tmp == num[i]) ans[i][j] = true;
if(tmp == num[j]) ans[j][i] = true;
}
}
for(int i = 1; i <= N; i++) {
for(int j = 1; j <= N; j++) {
if(ans[i][j]) Report(i, j);
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
5 ms |
868 KB |
Output is correct |
3 |
Correct |
3 ms |
952 KB |
Output is correct |
4 |
Correct |
3 ms |
952 KB |
Output is correct |
5 |
Correct |
2 ms |
952 KB |
Output is correct |
6 |
Correct |
4 ms |
952 KB |
Output is correct |
7 |
Correct |
5 ms |
1004 KB |
Output is correct |
8 |
Correct |
4 ms |
1136 KB |
Output is correct |
9 |
Correct |
4 ms |
1136 KB |
Output is correct |
10 |
Correct |
3 ms |
1136 KB |
Output is correct |
11 |
Correct |
4 ms |
1136 KB |
Output is correct |
12 |
Correct |
3 ms |
1136 KB |
Output is correct |
13 |
Correct |
4 ms |
1136 KB |
Output is correct |
14 |
Correct |
4 ms |
1136 KB |
Output is correct |
15 |
Correct |
4 ms |
1136 KB |
Output is correct |
16 |
Correct |
4 ms |
1136 KB |
Output is correct |
17 |
Correct |
4 ms |
1208 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
5 ms |
868 KB |
Output is correct |
3 |
Correct |
3 ms |
952 KB |
Output is correct |
4 |
Correct |
3 ms |
952 KB |
Output is correct |
5 |
Correct |
2 ms |
952 KB |
Output is correct |
6 |
Correct |
4 ms |
952 KB |
Output is correct |
7 |
Correct |
5 ms |
1004 KB |
Output is correct |
8 |
Correct |
4 ms |
1136 KB |
Output is correct |
9 |
Correct |
4 ms |
1136 KB |
Output is correct |
10 |
Correct |
3 ms |
1136 KB |
Output is correct |
11 |
Correct |
4 ms |
1136 KB |
Output is correct |
12 |
Correct |
3 ms |
1136 KB |
Output is correct |
13 |
Correct |
4 ms |
1136 KB |
Output is correct |
14 |
Correct |
4 ms |
1136 KB |
Output is correct |
15 |
Correct |
4 ms |
1136 KB |
Output is correct |
16 |
Correct |
4 ms |
1136 KB |
Output is correct |
17 |
Correct |
4 ms |
1208 KB |
Output is correct |
18 |
Runtime error |
10 ms |
2156 KB |
Execution failed because the return code was nonzero |
19 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
5 ms |
868 KB |
Output is correct |
3 |
Correct |
3 ms |
952 KB |
Output is correct |
4 |
Correct |
3 ms |
952 KB |
Output is correct |
5 |
Correct |
2 ms |
952 KB |
Output is correct |
6 |
Correct |
4 ms |
952 KB |
Output is correct |
7 |
Correct |
5 ms |
1004 KB |
Output is correct |
8 |
Correct |
4 ms |
1136 KB |
Output is correct |
9 |
Correct |
4 ms |
1136 KB |
Output is correct |
10 |
Correct |
3 ms |
1136 KB |
Output is correct |
11 |
Correct |
4 ms |
1136 KB |
Output is correct |
12 |
Correct |
3 ms |
1136 KB |
Output is correct |
13 |
Correct |
4 ms |
1136 KB |
Output is correct |
14 |
Correct |
4 ms |
1136 KB |
Output is correct |
15 |
Correct |
4 ms |
1136 KB |
Output is correct |
16 |
Correct |
4 ms |
1136 KB |
Output is correct |
17 |
Correct |
4 ms |
1208 KB |
Output is correct |
18 |
Runtime error |
10 ms |
2156 KB |
Execution failed because the return code was nonzero |
19 |
Halted |
0 ms |
0 KB |
- |