Problem pigeonhole
User Johnnie
Submission Time 2023-11-15 14:07:57
Score 0
Max Time N/A
Max Memory N/A

Compile Error

pigeonhole.cpp: In function ‘int main()’:
pigeonhole.cpp:7:16: error: expected ‘;’ before ‘int’
7 | cout.tie(NULL)
| ^
| ;
8 | int n, holes;
| ~~~
pigeonhole.cpp:9:9: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
9 | cin >> n >> holes;
| ^
| yn
pigeonhole.cpp:9:14: error: ‘holes’ was not declared in this scope
9 | cin >> n >> holes;
| ^~~~~
pigeonhole.cpp:19:4: error: ‘numOfPidgeons’ was not declared in this scope
19 | numOfPidgeons[pidgeon % holes] += 1;
| ^~~~~~~~~~~~~
pigeonhole.cpp:23:4: error: ‘numOfPidgeons’ was not declared in this scope
23 | numOfPidgeons[pidgeon % holes] -= 1;
| ^~~~~~~~~~~~~
pigeonhole.cpp:28:8: error: ‘numOfPidgeons’ was not declared in this scope
28 | if (numOfPidgeons[i] > max)
|