제출 #818937

#제출 시각아이디문제언어결과실행 시간메모리
818937farhan132게임 (IOI14_game)C++17
100 / 100
259 ms16316 KiB
#include "game.h"
#include <bits/stdc++.h>
 
using namespace std;
 
typedef long long ll;
typedef pair<ll , ll> ii;
 
#define ff first
#define ss second
#define pb push_back
#define in insert

const ll N = 1505;

ll deg[N], n;

void initialize(int _n) {
    n = _n;
    for(ll i = 0; i <= n; i++) deg[i] = 0;
    return;
}

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