Problem pigeonhole
User GYEE26
Submission Time 2024-11-02 20:27:21
Score 0
Max Time N/A
Max Memory N/A

Compile Error

pigeonhole.cpp: In function ‘int main()’:
pigeonhole.cpp:7:21: error: expected identifier before numeric constant
7 | int holes[h] = [0,0,0];
| ^
pigeonhole.cpp:7:22: error: expected ‘]’ before ‘,’ token
7 | int holes[h] = [0,0,0];
| ^
| ]
pigeonhole.cpp: In lambda function:
pigeonhole.cpp:7:22: error: expected ‘{’ before ‘,’ token
pigeonhole.cpp: In function ‘int main()’:
pigeonhole.cpp:7:22: error: array must be initialized with a brace-enclosed initializer
pigeonhole.cpp:7:23: error: expected unqualified-id before numeric constant
7 | int holes[h] = [0,0,0];
| ^
pigeonhole.cpp:10:15: error: ‘x’ was not declared in this scope
10 | holes[x]=0;
| ^
pigeonhole.cpp:13:22: error: ‘i’ was not declared in this scope
13 | for (int j=0;j<n;i++){
|