Problem mountainjourney
User QRcoder
Submission Time 2026-06-24 10:24:39
Score 0
Max Time N/A
Max Memory N/A

Compile Error

mountainjourney.cpp: In function ‘int main()’:
mountainjourney.cpp:10:13: error: invalid types ‘long long int[long long int]’ for array subscript
10 | cin >> N [i];
| ^
mountainjourney.cpp:13:10: error: request for member ‘begin’ in ‘N’, which is of non-class type ‘long long int’
13 | sort (N.begin (), N.end ());
| ^~~~~
mountainjourney.cpp:13:22: error: request for member ‘end’ in ‘N’, which is of non-class type ‘long long int’
13 | sort (N.begin (), N.end ());
| ^~~
mountainjourney.cpp:15:18: error: ‘vec’ was not declared in this scope
15 | for (auto itr : vec) {
| ^~~
mountainjourney.cpp:21:17: error: ‘std::vector<long long int> M()’ redeclared as different kind of entity
21 | vector<int> M ();
| ^
mountainjourney.cpp:18:6: note: previous declaration ‘long long int M’
18 | int M;