elephants.cpp: In function 'void init(int, int, int*)':
elephants.cpp:54:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
54 | scanf("%d", &M);
| ~~~~~^~~~~~~~~~
elephants.cpp:67:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
67 | scanf("%d %d", &i, &y);
| ~~~~~^~~~~~~~~~~~~~~~~
elephants.cpp: In function 'int main()':
elephants.cpp:77:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
77 | scanf("%d %d", &n, &l);
| ~~~~~^~~~~~~~~~~~~~~~~
elephants.cpp:83:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
83 | scanf("%d", &X[a]);
| ~~~~~^~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccjDtWHO.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccCBIjVb.o:elephants.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status