Problem lunchbox
User WangZ
Submission Time 2025-04-13 12:46:53
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp:3:11: error: expected identifier before ‘using’
3 | namespace using std;
| ^~~~~
lunchbox.cpp:3:17: error: expected nested-name-specifier before ‘std’
3 | namespace using std;
| ^~~
lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:6:18: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
6 | int n, s, to=0; cin >> n >>;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:75,
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:6:29: error: expected primary-expression before ‘;’ token
6 | int n, s, to=0; cin >> n >>;
| ^
lunchbox.cpp:7:2: error: ‘priori