Problem | runaway |
---|---|
User | Zachareeeee |
Submission Time | 2024-12-16 13:48:07 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
runaway.cpp: In function ‘int main()’:
runaway.cpp:12:10: error: ‘temp’ was not declared in this scope
12 | sort(temp.begin(), temp.end());
| ^~~~
runaway.cpp:19:25: error: no match for ‘operator[]’ (operand types are ‘std::vector<long int>’ and ‘__gnu_cxx::__normal_iterator<long int*, std::vector<long int> >’)
19 | cout << N - temp[ket-1] << "\n";
| ^
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/functional:62,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from runaway.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:1040:7: note: candidate: ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_T