제출 #384598

#제출 시각아이디문제언어결과실행 시간메모리
384598fadi57CONSUL (info1cup19_consul)C++14
컴파일 에러
0 ms0 KiB
#include "grader.cpp" //#include<bits/stdc++.h> using namespace std; void solve(int n) { map<int,int>mp; /// insert your code /// for example int z=n/3; for(int i=1;i<=n;i++){ int me=kth(i); mp[me]++; if(mp[me]>z){ say_answer(me); break; } } }

컴파일 시 표준 에러 (stderr) 메시지

consul.cpp: In function 'void solve(int)':
consul.cpp:7:5: error: 'map' was not declared in this scope
    7 |     map<int,int>mp;
      |     ^~~
consul.cpp:2:1: note: 'std::map' is defined in header '<map>'; did you forget to '#include <map>'?
    1 | #include "grader.cpp"
  +++ |+#include <map>
    2 | //#include<bits/stdc++.h>
consul.cpp:7:9: error: expected primary-expression before 'int'
    7 |     map<int,int>mp;
      |         ^~~
consul.cpp:13:5: error: 'mp' was not declared in this scope; did you mean 'me'?
   13 |     mp[me]++;
      |     ^~
      |     me