# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
924515 |
2024-02-09T07:06:51 Z |
tosivanmak |
Game (IOI14_game) |
C++17 |
|
1 ms |
444 KB |
#include<bits/stdc++.h>
using namespace std;
#define ll long long
// #ifdef __cplusplus
// extern "C" {
// #endif
// void initialize(int n);
// int hasEdge(int u, int v);
// #ifdef __cplusplus
// }
// #endif
// TODO: global variables can be declared here
ll cnt[1505];
ll cancut,outn;
ll cutedges=0;
void initialize(int n) {
// TODO: implementation
for(int i=0;i<1500;i++){
cnt[i]=0;
}
cancut=n*(n-1)/2-(n-1);
outn=n;
}
int hasEdge(int u, int v) {
// TODO: implementation
cnt[u]++,cnt[v]++;
if(cutedges>=cancut){
return 1;
}
if(cnt[u]==outn-1 or cnt[v]==outn-1){
return 1;
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Incorrect |
1 ms |
444 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
440 KB |
Output is correct |
3 |
Correct |
1 ms |
344 KB |
Output is correct |
4 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |