Problem cups
User eliasxyz
Submission Time 2025-06-13 20:24:48
Score 0
Max Time N/A
Max Memory N/A

Compile Error

cups.cpp: In function ‘int main()’:
cups.cpp:18:10: error: found ‘:’ in nested-name-specifier, expected ‘::’
18 | for(&p:cups){
| ^
| ::
cups.cpp:18:9: error: ‘p’ has not been declared
18 | for(&p:cups){
| ^
cups.cpp:21:3: error: expected primary-expression before ‘}’ token
21 | } else if(x==1){
| ^
cups.cpp:20:5: error: expected ‘;’ before ‘}’ token
20 | }
| ^
| ;
21 | } else if(x==1){
| ~
cups.cpp:21:3: error: expected primary-expression before ‘}’ token
21 | } else if(x==1){
| ^
cups.cpp:20:5: error: expected ‘)’ before ‘}’ token
20 | }
| ^
| )
21 | } else if(x==1){
| ~
cups.cpp:18:7: note: to match this ‘(’
18 | for(&p:cups){
| ^
cups.cpp:21:3: error: expected primary-expression before ‘}’ token
21 | } else if