rainbow.cpp: In function 'int main()':
rainbow.cpp:10:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
10 | freopen("sample.in", "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
rainbow.cpp:12:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
12 | scanf("%d %d %d %d", &R, &C, &M, &Q);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rainbow.cpp:13:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
13 | scanf("%d %d", &sr, &sc);
| ~~~~~^~~~~~~~~~~~~~~~~~~
rainbow.cpp:16:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
16 | scanf(" %s ", S);
| ~~~~~^~~~~~~~~~~
rainbow.cpp:24:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
24 | scanf("%d %d %d %d", &ar, &ac, &br, &bc);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/ccQXMeET.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccFZMWgq.o:rainbow.cpp:(.text.startup+0x0): first defined here
/tmp/ccFZMWgq.o: In function `main':
rainbow.cpp:(.text.startup+0xa3): undefined reference to `init(int, int, int, int, int, char*)'
rainbow.cpp:(.text.startup+0xec): undefined reference to `colour(int, int, int, int)'
/tmp/ccQXMeET.o: In function `main':
grader.cpp:(.text.startup+0xcc): undefined reference to `init(int, int, int, int, int, char*)'
grader.cpp:(.text.startup+0x131): undefined reference to `colour(int, int, int, int)'
collect2: error: ld returned 1 exit status