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

Compile Error

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