제출 #1020310

#제출 시각아이디문제언어결과실행 시간메모리
1020310MarwenElarbi게임 (IOI14_game)C++17
100 / 100
363 ms126712 KiB
#include <bits/stdc++.h>
#include "game.h"
using namespace std;
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#define pb push_back
#define se second
#define fi first
#define optimise ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
const int nax=1e5+5;
int N;
set<int> st[nax];
int cnt[nax];
void initialize(int n) {
    N=n;
    for (int i = 0; i < n; ++i)
    {
        cnt[i]=n-i-1;
        for (int j = 0; j < n; ++j)
        {
            if(j==i) continue;
            st[i].insert(j);
        }
    }
}

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