Problem snack
User LimCheeHann
Submission Time 2025-03-14 15:22:02
Score 0
Max Time N/A
Max Memory N/A

Compile Error

snack.cpp: In function ‘int main()’:
snack.cpp:6:2: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
6 | cin >> N;
| ^~~
| std::cin
In file included from snack.cpp:1:
/usr/include/c++/9/iostream:60:18: note: ‘std::cin’ declared here
60 | extern istream cin; /// Linked to standard input
| ^~~
snack.cpp:8:2: error: ‘string’ was not declared in this scope
8 | string S;
| ^~~~~~
snack.cpp:8:2: note: suggested alternatives:
In file included from /usr/include/c++/9/iosfwd:39,
from /usr/include/c++/9/ios:38,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from snack.cpp:1:
/usr/include/c++/9/bits/stringfwd.h:79:33: note: ‘std::string’
79 | typedef basic_string<char> string;
| ^~~~~~
In file included f