This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "game.h"
#include <bits/stdc++.h>
using namespace std;
long x,z,n;
bool ok=false,ok2=false,ok3=false;
void initialize(int n) {
}
int hasEdge(int u, int v) {
if(!ok){
ok=true;
x=u;
z=v;
return 1;
}
else{
if(!ok2){
if(u==x||u==z){
n=v;
ok2=true;
return 0;
}
else if(v==x||v==z){
n=u;
ok2=true;
return 0;
}
return 0;
}
else{
if(!ok3){
if(u==n||v==n){
ok3=true;
return 1;
}
return 0;
}
else{
return 0;
}
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |