Problem modules
User grapecoder
Submission Time 2024-01-20 16:04:46
Score 0
Max Time N/A
Max Memory N/A

Compile Error

modules.cpp: In function ‘int dp(int)’:
modules.cpp:49:98: error: no match for ‘operator-’ (operand types are ‘std::pair<int, std::pair<int, int> >’ and ‘std::pair<int, std::pair<int, int> > [100010]’)
49 | int j = upper_bound(modules + 1, modules + N + 1, mp(modules[i].second.first - gap, mp(-1, 0)) - modules - 1;
| ^ ~~~~~~~
| |
| std::pair<int, std::pair<int, int> > [100010]
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/bi