Submission #716902

#TimeUsernameProblemLanguageResultExecution timeMemory
716902aykhnGame (IOI14_game)C++14
0 / 100
1 ms304 KiB
#include <bits/stdc++.h>
#include "game.h"

using namespace std;

typedef long long ll;

#define OPT ios_base::sync_with_stdio(0); \
            cin.tie(0); \
            cout.tie(0)

#define pii pair<int,int>
#define pll pair<ll,ll>
#define endl "\n"
#define all(v) v.begin(), v.end()
#define mpr make_pair
#define pb push_back
#define ts to_string
#define fi first
#define se second
#define inf 0x3F3F3F3F
#define bpc __builtin_popcount
#define print(v) for(int i = 0; i < v.size(); i++) cout << v[i] << " "; cout<<endl;

int n;
vector<int> cnt;
void initialize(int x)
{
    n = x;
    cnt.assign(n+1, n - 1);
}

int hasEdge(int u, int v)
{
    if (cnt[u] == 1 || cnt[v] == 1)
    {
        cnt[u]--;
        cnt[v]--;
        return 1;
    }
    cnt[u]--;
    cnt[v]--;
    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...