Problem candymountain_ex
User Phoubia01
Submission Time 2025-08-22 23:10:14
Score 0
Max Time N/A
Max Memory N/A

Compile Error

candymountain_ex.cpp:3:7: error: expected nested-name-specifier before ‘ll’
3 | using ll - long long;
| ^~
candymountain_ex.cpp: In function ‘int main()’:
candymountain_ex.cpp:11:12: error: ‘ll’ was not declared in this scope
11 | vector<ll> pebbles(n);
| ^~
candymountain_ex.cpp:11:14: error: template argument 1 is invalid
11 | vector<ll> pebbles(n);
| ^
candymountain_ex.cpp:11:14: error: template argument 2 is invalid
candymountain_ex.cpp:13:25: error: invalid types ‘int[int]’ for array subscript
13 | cin >> pebbles[i];
| ^
candymountain_ex.cpp:16:7: error: expected ‘;’ before ‘high’
16 | ll high = *max_element(pebbles.begin(), pebbles.end());
| ^~~~~
| ;
candymountain_ex.cpp:18:7: error: expected ‘;’ before ‘result’
18 | ll result = high;
| ^~~~~~~