# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
398345 | kevinxiehk | Game (IOI14_game) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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
int count[1505],target[1505],n;
void initialize(int N) {
// TODO: implementation
n=N;
for(int i=0;i<N;i++)count[i]=0;
}
int max(int a,int b){
if(a>b)return a;
return b;
}
int hasEdge(int u, int v) {
// TODO: implementation
count[max(u,v)]++;
if(count[max(u,v)]==max(u,v))return 1;
return 0;
}