Problem gotoschool
User WangZ
Submission Time 2025-07-03 20:40:17
Score 0
Max Time N/A
Max Memory N/A

Compile Error

gotoschool.cpp: In function ‘int main()’:
gotoschool.cpp:7:9: error: wrong number of template arguments (1, should be at least 2)
7 | map<int>(n+1) m;
| ^
In file included from /usr/include/c++/9/map:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
from gotoschool.cpp:1:
/usr/include/c++/9/bits/stl_map.h:100:11: note: provided for ‘template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map’
100 | class map
| ^~~
gotoschool.cpp:10:3: error: ‘m’ was not declared in this scope
10 | m[temp] = count-n;
| ^
gotoschool.cpp:12:14: error: ‘m’ was not declared in this scope
12 | for (auto x:m){
| ^