grader.cpp: In function 'int main()':
grader.cpp:14:9: warning: unused variable 'd' [-Wunused-variable]
14 | int i, d;
| ^
grader.cpp:15:12: warning: unused variable 'max_code' [-Wunused-variable]
15 | long long max_code;
| ^~~~~~~~
grader.cpp:17:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
17 | scanf("%d%lld", &N, &M);
| ~~~~~^~~~~~~~~~~~~~~~~~
grader.cpp:19:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
19 | scanf("%lld", &coins[i]);
| ~~~~~^~~~~~~~~~~~~~~~~~~
grader.cpp:23:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
23 | scanf("%d", &Q);
| ~~~~~^~~~~~~~~~
grader.cpp:26:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
26 | scanf("%d%d", &ck, &c);
| ~~~~~^~~~~~~~~~~~~~~~~
grader.cpp:28:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
28 | scanf("%lld", &A[j]);
| ~~~~~^~~~~~~~~~~~~~~
/tmp/cc9WvP1x.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccEWFvDS.o:happiness.cpp:(.text.startup+0x0): first defined here
/tmp/cc9WvP1x.o: In function `main':
grader.cpp:(.text.startup+0x6d): undefined reference to `init(int, long long, long long*)'
grader.cpp:(.text.startup+0xff): undefined reference to `is_happy(int, int, long long*)'
collect2: error: ld returned 1 exit status