제출 #1194220

#제출 시각아이디문제언어결과실행 시간메모리
1194220PlayVoltz게임 (IOI14_game)C++20
컴파일 에러
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; }

컴파일 시 표준 에러 (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;
      |                  ^