Problem whaleroles
User shadowblade2718
Submission Time 2026-05-13 15:46:42
Score 0
Max Time N/A
Max Memory N/A

Compile Error

whaleroles.cpp: In function ‘int main()’:
whaleroles.cpp:7:14: error: wrong number of template arguments (1, should be 2)
7 | array<int> roles(N);
| ^
In file included from /usr/include/c++/9/tuple:39,
from /usr/include/c++/9/functional:54,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from whaleroles.cpp:1:
/usr/include/c++/9/array:94:12: note: provided for ‘template<class _Tp, long unsigned int _Nm> struct std::array’
94 | struct array
| ^~~~~
whaleroles.cpp:12:16: error: invalid types ‘int[int]’ for array subscript
12 | roles[i] = temp;
| ^
whaleroles.cpp:15:27: error: invalid types ‘int[int]’ for array subscript
15 | int role = roles[i];