Problem lunchbox
User ndgsghdj
Submission Time 2025-04-16 07:03:54
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:8:2: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
8 | cin >> N >> m;
| ^~~
| std::cin
In file included from lunchbox.cpp:1:
/usr/include/c++/9/iostream:60:18: note: ‘std::cin’ declared here
60 | extern istream cin; /// Linked to standard input
| ^~~
lunchbox.cpp:10:2: error: ‘vector’ was not declared in this scope
10 | vector<long long> schools(m+1, 0);
| ^~~~~~
lunchbox.cpp:10:2: note: suggested alternatives:
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/functional:62,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from lunchbox.cpp:2:
/usr/include/c++/9/bits/stl_vector.h:386:11: note: ‘std::vector’
386 | class vector : protect