# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1013506 | Error404 | 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.
#include "bits/stdc++.h"
using namespace std;
#define ll long long
#define f first
#define s second
#define pi pair<ll,ll>
#define vi vector<ll>
#define vpi vector<pi>
#define pb push_back
#define INF 1e18
#define endl '\n'
//#define int ll
#define pii pair<pi,ll>
const int MAX = 1e5+1;
vpi g[MAX];
ll dis[MAX][2];
int hold[MAX];
void initialize(int n){
for(int i = 1; i <=n ; i++){
hold[i] =i-1;
}
}
int hasEdge(int u,int v){
if(u <v) swap(u,v);
if(hold[i]==1) return 1;
else{
hold[i]--;
return 0;
}
}