Problem duckhunt5
User Dolphy
Submission Time 2026-10-14 22:39:04
Score 0
Max Time N/A
Max Memory N/A

Compile Error

duckhunt5.cpp: In function ‘int main()’:
duckhunt5.cpp:14:83: error: no match for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘std::pair<const int, int>’)
14 | if (t==3) {auto it=m.lower_bound(x); if (it==m.end()) cout << "-1\n"; else cout << *it << "\n";}
| ~~~~ ^~ ~~~
| | |
| | std::pair<const int, int>
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/9/istream:39,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from