Problem snack
User MintTea
Submission Time 2023-11-24 23:02:23
Score 0
Max Time N/A
Max Memory N/A

Compile Error

snack.cpp:5:27: error: ISO C++ forbids declaration of ‘processstr’ with no type [-fpermissive]
5 | int processstr(string stri){
| ^
snack.cpp: In function ‘int32_t main()’:
snack.cpp:16:9: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
16 | int n;
| ^
| yn
snack.cpp:21:56: error: overloaded function with no contextual type information
21 | int prev = max(processstr(charstring.substr(0,1)),0);
| ^
snack.cpp:22:9: error: ‘current’ was not declared in this scope
22 | int current = prev;
| ^~~~~~~
snack.cpp:23:9: error: ‘max_sofar’ was not declared in this scope
23 | int max_sofar = 0;
| ^~~~~~~~~
snack.cpp:25:14: error: ‘i’ was not declared in this scope
25 | for (int i = 1; i < n; i++){
| ^