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

Compile Error

problemsetter.cpp: In function ‘int main()’:
problemsetter.cpp:18: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’}
18 | prefix.push_back(max(prefix.back(), prefix[i].second));
| ^~~~~~
problemsetter.cpp:24:17: error: ‘upperbound’ was not declared in this scope
24 | int x = upperbound(contest.begin(), contest.end(), make_pair(a, 1e9)) - contest.begin() - 1;
| ^~~~~~~~~~
problemsetter.cpp:26:13: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
26 | ans += max(0, prefix[x] - b);
| ^~~
| abs
problemsetter.cpp:29:13: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
29 |