Problem problemsetter
User Phoubia01
Submission Time 2025-05-14 08:40:47
Score 0
Max Time N/A
Max Memory N/A

Compile Error

problemsetter.cpp: In function ‘int main()’:
problemsetter.cpp:19:59: error: request for member ‘second’ in ‘prefix.std::vector<int>::operator[](((std::vector<int>::size_type)i))’, which is of non-class type ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type’ {aka ‘int’}
19 | prefix.push_back(max(prefix.back(), prefix[i].second));
| ^~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:71,
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 problemsetter.cpp:1:
/usr/include/c++/9/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Val_less_iter::operator()(_Value&, _Iterator) const [with _Value = const std::pair<int, double>; _Iterator = __gnu_cxx::__no