Submission #880518

#TimeUsernameProblemLanguageResultExecution timeMemory
880518Mr_HusanboyGame (IOI14_game)C++17
Compilation error
0 ms0 KiB
#include "game.h"
#include<bits/stdc++.h>
template<typename T>
int len(T &a){
    return a.size();
}
 
using namespace std;
vector<int> cnt;
 
void initialize(int N){
    n = N;
    cnt.resize(n, n - 1);
}
 
int hasEdge(int u, int v){
    if(u < v) swap(u, v);
  	cnt[u] ++;
  	return cnt[u] == u;
}

Compilation message (stderr)

game.cpp: In function 'void initialize(int)':
game.cpp:12:5: error: 'n' was not declared in this scope
   12 |     n = N;
      |     ^