Submission #1344490

#TimeUsernameProblemLanguageResultExecution timeMemory
1344490kantaponzGame (IOI14_game)C++20
100 / 100
167 ms7052 KiB
#include "game.h"
#include <bits/stdc++.h>
using namespace std;

const int nx = 1505;

int rem[nx];

void initialize(int n) {
    for (int i = 0; i < n; i++) rem[i] = i - 1;
}

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