Submission #1194220

#TimeUsernameProblemLanguageResultExecution timeMemory
1194220PlayVoltzGame (IOI14_game)C++20
Compilation error
0 ms0 KiB
#include "game.h" #include <bits/stdc++.h> using namespace std; vector<int> cc; void initialize(int n){ cc.resize(n, 0); } int hasEdge(int a, int b){ ++count[max(a, b)]; if (count[max(a, b)]==max(a, b))return 1; return 0; }

Compilation message (stderr)

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:12:16: error: invalid types '<unresolved overloaded function type>[const int]' for array subscript
   12 |         ++count[max(a, b)];
      |                ^
game.cpp:13:18: error: invalid types '<unresolved overloaded function type>[const int]' for array subscript
   13 |         if (count[max(a, b)]==max(a, b))return 1;
      |                  ^