Submission #552029

#TimeUsernameProblemLanguageResultExecution timeMemory
552029razvanGame (IOI14_game)C++14
0 / 100
1 ms284 KiB
#include "game.h"
#include <iostream>
#include <fstream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#define pb push_back

using namespace std;

const int maxn = 1505;
int n, r;
int a[maxn][maxn];
void initialize(int n) {
    ::n = n;
    r = n * (n - 1) / 2;
    for(int i = 0; i < n; i ++) {
        for(int j = 0; j < n; j ++)
            a[i][j] = -1;
    }
}
int done[maxn];
int hasEdge(int x, int y) {
    //cout << n << '\n';
    if(done[x] < n - 2 && done[y] < n - 2) {
        done[x] ++;
        done[y] ++;
        return 0;
    } else /*if(done[x] == n - 2)*/ {
        done[x] ++;
        done[y] ++;
        return 1;
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...