Submission #889127

#TimeUsernameProblemLanguageResultExecution timeMemory
889127shezittGame (IOI14_game)C++14
15 / 100
1 ms444 KiB
#include "game.h"
#include <bits/stdc++.h>

// Subtask 1 n = 4

using namespace std;

const int N = 1505;
int cont[N];
int neg = 0;

void initialize(int n) {
    memset(cont, 0, sizeof cont);
    neg = 0;
    return;
}

int hasEdge(int u, int v) {
    if(cont[u] == 2 or cont[v] == 2){
        // must be positive
        return 1;
    }
    if(neg == 3){
        // must be positive
        return 1;
    }
    cont[u]++;
    cont[v]++;
    neg++;
    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...