Problem thumper2
User kiwiwi
Submission Time 2025-05-23 10:07:17
Score 0
Max Time N/A
Max Memory N/A

Compile Error

thumper2.cpp: In function ‘int main()’:
thumper2.cpp:42:127: error: no match for ‘operator+’ (operand types are ‘std::pair<int, int>’ and ‘int’)
42 | int maxRow = *max_element(rabbits.begin(), rabbits.end(), [](const auto &a, const auto &b) { return a.first < b.first; }) + 1;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
| | |
| std::pair<int, int> 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,