circus.cpp: In function 'int put(int)':
circus.cpp:30:33: error: a function-definition is not allowed here before '{' token
30 | void init(int N, int M, int P[]){
| ^
circus.cpp:68:22: error: a function-definition is not allowed here before '{' token
68 | int minLength(int D) {
| ^
circus.cpp:76:1: error: expected '}' at end of input
76 | }
| ^
circus.cpp:27:16: note: to match this '{'
27 | int put(int i) {
| ^
circus.cpp:76:1: warning: no return statement in function returning non-void [-Wreturn-type]
76 | }
| ^
grader.cpp: In function 'int main()':
grader.cpp:14:12: warning: unused variable 'max_code' [-Wunused-variable]
14 | long long max_code;
| ^~~~~~~~
grader.cpp:16:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
16 | scanf("%d%d", &N, &M);
| ~~~~~^~~~~~~~~~~~~~~~
grader.cpp:18:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
18 | scanf("%d", &P[i]);
| ~~~~~^~~~~~~~~~~~~
grader.cpp:21:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
21 | scanf("%d", &Q);
| ~~~~~^~~~~~~~~~
grader.cpp:23:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
23 | scanf("%d", &d);
| ~~~~~^~~~~~~~~~