Problem globalwarming
User RandomCtfNoob
Submission Time 2026-01-21 16:10:08
Score 0
Max Time N/A
Max Memory N/A

Compile Error

globalwarming.cpp: In function ‘int main()’:
globalwarming.cpp:20:22: error: expected ‘;’ before ‘>=’ token
20 | for (int i=highest,i>=0;i--){
| ^~
| ;
globalwarming.cpp:20:22: error: expected primary-expression before ‘>=’ token
20 | for (int i=highest,i>=0;i--){
| ^~
globalwarming.cpp:22:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
22 | if (island == 3){
| ^
globalwarming.cpp:26:4: error: expected ‘,’ or ‘;’ before ‘if’
26 | if (pos > 0 && i >= island[pos-1]) {
| ^~
globalwarming.cpp:32:12: error: incompatible types in assignment of ‘int’ to ‘int [n]’
32 | island+=1;
| ^
globalwarming.cpp:34:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
34 | if (island == 3){
|