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 <bits/stdc++.h>
#define endl "\n"
#define yeap cout<<"YES"<<endl
#define nope cout<<"NO"<<endl
#define ll long long
using namespace std;
#include "game.h"
ll cnt, a, b, status, c, d;
void initialize(int n) {
cnt = 0;
status = -1;
}
int hasEdge(int u, int v) {
if(cnt==0){
a = u;
b = v;
cnt++;
ll cn = 0;
for(int i=0; i<4; i++){
if(i!=a && i!=b){
if(cn==0){
c = i;
cn++;
} else {
d = i;
}
}
}
// cout << c << " " << d << endl;
return 1;
} else {
cnt++;
if(cnt==5){
if(u==c && v==d){
status = 1;
return 1;
} else if(u==d && v==c){
status = 1;
return 1;
} else {
if(status==1){
return 0;
} else {
return 1;
}
}
} else {
if(u==c && v==d){
status = 1;
return 1;
} else if(u==d && v==c){
status = 1;
return 1;
} 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... |