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

Compile Error

foreveralone.cpp: In function ‘int32_t main()’:
foreveralone.cpp:8:14: error: the value of ‘n’ is not usable in a constant expression
8 | array<int, n> cat; cat.fill(1);
| ^
foreveralone.cpp:6:6: note: ‘long long int n’ is not const
6 | int n, m; cin >> n >> m;
| ^
foreveralone.cpp:8:14: note: in template argument for type ‘long unsigned int’
8 | array<int, n> cat; cat.fill(1);
| ^
foreveralone.cpp:8:25: error: request for member ‘fill’ in ‘cat’, which is of non-class type ‘int’
8 | array<int, n> 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 array subscript
12 | cat[a-1] = 0; cat[b-1] = 0;
|