Submission #319393

#TimeUsernameProblemLanguageResultExecution timeMemory
319393NaynaGame (IOI14_game)C++14
100 / 100
386 ms16484 KiB
#include "game.h"
#include <bits/stdc++.h>
using namespace std;
const int mxn = 2000;

int cnt[mxn];
int node;
void initialize(int n) {
    node = n;
    for(int i = 0; i <= n; i++) cnt[i] = 0;
}

int hasEdge(int u, int v) {
    
    if(u>v) swap(u, v);
    u++, v++;
    cnt[u]++;
    //cout << u << ' ' << cnt[u] << '\n';
    if(cnt[u]==(node-u)) return 1;
    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...