Problem foreveralone
User 123456789
Submission Time 2023-04-28 14:14:14
Score 0
Max Time N/A
Max Memory N/A

Compile Error

foreveralone.cpp: In function ‘int32_t main()’:
foreveralone.cpp:8:15: error: the value of ‘nn’ is not usable in a constant expression
8 | array<int, nn> cat; cat.fill(1);
| ^
foreveralone.cpp:6:37: note: ‘nn’ was not initialized with a constant expression
6 | int n, m; cin >> n >> m; const int nn = n;
| ^~
foreveralone.cpp:8:15: note: in template argument for type ‘long unsigned int’
8 | array<int, nn> cat; cat.fill(1);
| ^
foreveralone.cpp:8:26: error: request for member ‘fill’ in ‘cat’, which is of non-class type ‘int’
8 | array<int, nn> cat; cat.fill(1);
| ^~~~
foreveralone.cpp:12:11: error: invalid types ‘int[long long int]’ for array subscript
12 | cat[a-1] = 0; cat[b-1] = 0;
| ^
foreveralone.cpp:12:25: error: invalid types ‘int[long long int]’ for ar