Problem globalwarming
User R9q5P8
Submission Time 2026-04-11 15:53:33
Score 0
Max Time N/A
Max Memory N/A

Compile Error

globalwarming.cpp: In function ‘int main()’:
globalwarming.cpp:18:2: error: expected ‘,’ or ‘;’ before ‘for’
18 | for (int i = 0; i < n; ++i)
| ^~~
globalwarming.cpp:18:18: error: ‘i’ was not declared in this scope
18 | for (int i = 0; i < n; ++i)
| ^
globalwarming.cpp:22:27: error: no match for ‘operator==’ (operand types are ‘std::basic_ostream<char>’ and ‘int’)
22 | cout << spawns[i] << i%n==n-1 ? endl : "";
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
| | |
| | int
| std::basic_ostream<char>
globalwarming.cpp:22:27: note: candidate: ‘operator==(int, int)’ <built-in>
22 | cout << spawns[i] << i%n==n-1 ? endl : "";
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
globalwarming.cpp:22:27: note: no known conversion for argument 1 from ‘std::basic_ostream<char>