Problem lunchbox
User XY3491
Submission Time 2026-02-28 10:12:37
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:5:14: error: no match for ‘operator>’ (operand types are ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’} and ‘int’)
5 | cin >> N > m;
| ~~~~~~~~ ^ ~
| | |
| | int
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
lunchbox.cpp:5:14: note: candidate: ‘operator>(int, int)’ <built-in>
5 | cin >> N > m;
| ~~~~~~~~~^~~
lunchbox.cpp:5:14: note: no known conversion for argument 1 from ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’} to ‘int’
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,