horses.cpp: In function 'void init_tree(int, int, int)':
horses.cpp:77:32: warning: declaration of 'm' shadows a global declaration [-Wshadow]
int l = u << 1, r = l | 1, m = b + e >> 1;
^
horses.cpp:12:8: note: shadowed declaration is here
int n, m;
^
horses.cpp:77:38: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int l = u << 1, r = l | 1, m = b + e >> 1;
^
horses.cpp: In function 'void modify_tree(int, int, int, int)':
horses.cpp:85:32: warning: declaration of 'm' shadows a global declaration [-Wshadow]
int l = u << 1, r = l | 1, m = b + e >> 1;
^
horses.cpp:12:8: note: shadowed declaration is here
int n, m;
^
horses.cpp:85:38: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int l = u << 1, r = l | 1, m = b + e >> 1;
^
horses.cpp: At global scope:
horses.cpp:94:15: warning: unused parameter 'argc' [-Wunused-parameter]
int main (int argc, char const *argv[]) {
^
horses.cpp:94:38: warning: unused parameter 'argv' [-Wunused-parameter]
int main (int argc, char const *argv[]) {
^
horses.cpp: In function 'int main(int, const char**)':
horses.cpp:95:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
^
horses.cpp:97:29: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld", x + i);
^
horses.cpp:101:29: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld", y + i);
^
horses.cpp:108:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &m); while (m--) {
^
horses.cpp:110:46: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %lld", &cmd, &pos, &val);
^
/tmp/ccR5s6yg.o: In function `main':
grader.c:(.text.startup+0x0): multiple definition of `main'
/tmp/cc9J9LOJ.o:horses.cpp:(.text.startup+0x0): first defined here
/tmp/ccR5s6yg.o: In function `main':
grader.c:(.text.startup+0x282): undefined reference to `init(int, int*, int*)'
grader.c:(.text.startup+0x75e): undefined reference to `updateX(int, int)'
grader.c:(.text.startup+0xae1): undefined reference to `updateY(int, int)'
collect2: error: ld returned 1 exit status