Problem bestplace
User sconsrr
Submission Time 2025-01-22 22:18:41
Score 0
Max Time N/A
Max Memory N/A

Compile Error

bestplace.cpp: In function ‘int main()’:
bestplace.cpp:8:2: error: expected ‘,’ or ‘;’ before ‘for’
8 | for (int i=0; i<N; i++) {
| ^~~
bestplace.cpp:8:16: error: ‘i’ was not declared in this scope
8 | for (int i=0; i<N; i++) {
| ^
bestplace.cpp:16:10: error: no match for ‘operator+’ (operand types are ‘std::vector<int>’ and ‘int’)
16 | sort(X,X+N);
| ~^~
| | |
| | int
| std::vector<int>
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from bestplace.cpp:1:
/usr/include/c++/9/bits/stl_iterator.h:423:5: note: candidate: ‘template<class _Iterator> constexpr std::reverse_iterator<_Iterator> s