# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
209784 |
2020-03-15T14:15:41 Z |
my99n |
Game (IOI14_game) |
C++14 |
|
5 ms |
376 KB |
#include "game.h"
#include <bits/stdc++.h>
using namespace std;
int deg[2000];
void initialize(int n) {
for (int i = 0; i < n; i++) deg[i] = n-1;
}
int hasEdge(int u, int v) {
// assert that query are unique
deg[u]--; deg[v]--;
if (!deg[u] and !deg[v]) return 0;
if (deg[v] == 0) swap(u, v);
if (deg[u] == 0) {
return 1;
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
256 KB |
Output is correct |
2 |
Correct |
5 ms |
256 KB |
Output is correct |
3 |
Correct |
5 ms |
256 KB |
Output is correct |
4 |
Incorrect |
4 ms |
256 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
256 KB |
Output is correct |
2 |
Correct |
4 ms |
256 KB |
Output is correct |
3 |
Correct |
5 ms |
256 KB |
Output is correct |
4 |
Incorrect |
5 ms |
376 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
376 KB |
Output is correct |
2 |
Correct |
5 ms |
376 KB |
Output is correct |
3 |
Correct |
5 ms |
256 KB |
Output is correct |
4 |
Incorrect |
5 ms |
256 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |