Problem lasers2
User ilikeeggs
Submission Time 2026-01-30 07:58:20
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lasers2.cpp: In function ‘int32_t main()’:
lasers2.cpp:12:9: error: wrong number of template arguments (1, should be at least 2)
12 | map<int> b; //number of walls blocking
| ^
In file included from /usr/include/c++/9/map:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
from lasers2.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
| ^~~
lasers2.cpp:19:7: error: invalid types ‘int[long long int]’ for array subscript
19 | b[j]++;
| ^
lasers2.cpp:27:28: error: invalid types ‘int[long long int]’ for array subscript
27 | b[a[i].first.first]--;
| ^
lasers2.cpp:34:18: error: request for member ‘begin’ in ‘b’, which is of non-class type ‘int’
34 | for(auto it = b.begi