Problem removalcosts
User YeoBL20
Submission Time 2023-02-01 22:57:04
Score 0
Max Time N/A
Max Memory N/A

Compile Error

removalcosts.cpp: In function ‘void solve()’:
removalcosts.cpp:10:23: error: ‘n’ was not declared in this scope; did you mean ‘_n’?
10 | long long _n; cin >> n;
| ^
| _n
removalcosts.cpp:12:58: error: ‘arr’ was not declared in this scope
12 | int arr[n + 1]; for (int i = 1; i <= n; i++) cin >> _n, arr[i] = _n;
| ^~~
removalcosts.cpp:13:27: error: ‘marked’ was not declared in this scope
13 | bool marked[n + 1]; fill(marked, marked + n + 1, 0);
| ^~~~~~
removalcosts.cpp:15:7: error: ‘arr’ was not declared in this scope
15 | if (arr[i] == -1) x += 1;
| ^~~
removalcosts.cpp:29:7: error: ‘arr’ was not declared in this scope
29 | if (arr[i] == -1){
| ^~~
removalcosts.cpp:49:7: error: ambiguous overload for ‘operator<<’ (operand