horses.cpp: In constructor 'Node::Node(int, int, int, int, int, int)':
horses.cpp:45:52: warning: declaration of 'val' shadows a member of 'Node' [-Wshadow]
45 | Node(int pre, int suf, int x, int y, int pos, int val) : pre(pre), suf(suf), x(x), y(y), pos(pos), val(val) {}
| ~~~~^~~
horses.cpp:43:27: note: shadowed declaration is here
43 | int pre, suf, x, y, pos, val;
| ^~~
horses.cpp:45:43: warning: declaration of 'pos' shadows a member of 'Node' [-Wshadow]
45 | Node(int pre, int suf, int x, int y, int pos, int val) : pre(pre), suf(suf), x(x), y(y), pos(pos), val(val) {}
| ~~~~^~~
horses.cpp:43:22: note: shadowed declaration is here
43 | int pre, suf, x, y, pos, val;
| ^~~
horses.cpp:45:36: warning: declaration of 'y' shadows a member of 'Node' [-Wshadow]
45 | Node(int pre, int suf, int x, int y, int pos, int val) : pre(pre), suf(suf), x(x), y(y), pos(pos), val(val) {}
| ~~~~^
horses.cpp:43:19: note: shadowed declaration is here
43 | int pre, suf, x, y, pos, val;
| ^
horses.cpp:45:29: warning: declaration of 'x' shadows a member of 'Node' [-Wshadow]
45 | Node(int pre, int suf, int x, int y, int pos, int val) : pre(pre), suf(suf), x(x), y(y), pos(pos), val(val) {}
| ~~~~^
horses.cpp:43:16: note: shadowed declaration is here
43 | int pre, suf, x, y, pos, val;
| ^
horses.cpp:45:20: warning: declaration of 'suf' shadows a member of 'Node' [-Wshadow]
45 | Node(int pre, int suf, int x, int y, int pos, int val) : pre(pre), suf(suf), x(x), y(y), pos(pos), val(val) {}
| ~~~~^~~
horses.cpp:43:11: note: shadowed declaration is here
43 | int pre, suf, x, y, pos, val;
| ^~~
horses.cpp:45:11: warning: declaration of 'pre' shadows a member of 'Node' [-Wshadow]
45 | Node(int pre, int suf, int x, int y, int pos, int val) : pre(pre), suf(suf), x(x), y(y), pos(pos), val(val) {}
| ~~~~^~~
horses.cpp:43:6: note: shadowed declaration is here
43 | int pre, suf, x, y, pos, val;
| ^~~
horses.cpp: In constructor 'Node::Node(int, int, int, int, int, int)':
horses.cpp:45:52: warning: declaration of 'val' shadows a member of 'Node' [-Wshadow]
45 | Node(int pre, int suf, int x, int y, int pos, int val) : pre(pre), suf(suf), x(x), y(y), pos(pos), val(val) {}
| ~~~~^~~
horses.cpp:43:27: note: shadowed declaration is here
43 | int pre, suf, x, y, pos, val;
| ^~~
horses.cpp:45:43: warning: declaration of 'pos' shadows a member of 'Node' [-Wshadow]
45 | Node(int pre, int suf, int x, int y, int pos, int val) : pre(pre), suf(suf), x(x), y(y), pos(pos), val(val) {}
| ~~~~^~~
horses.cpp:43:22: note: shadowed declaration is here
43 | int pre, suf, x, y, pos, val;
| ^~~
horses.cpp:45:36: warning: declaration of 'y' shadows a member of 'Node' [-Wshadow]
45 | Node(int pre, int suf, int x, int y, int pos, int val) : pre(pre), suf(suf), x(x), y(y), pos(pos), val(val) {}
| ~~~~^
horses.cpp:43:19: note: shadowed declaration is here
43 | int pre, suf, x, y, pos, val;
| ^
horses.cpp:45:29: warning: declaration of 'x' shadows a member of 'Node' [-Wshadow]
45 | Node(int pre, int suf, int x, int y, int pos, int val) : pre(pre), suf(suf), x(x), y(y), pos(pos), val(val) {}
| ~~~~^
horses.cpp:43:16: note: shadowed declaration is here
43 | int pre, suf, x, y, pos, val;
| ^
horses.cpp:45:20: warning: declaration of 'suf' shadows a member of 'Node' [-Wshadow]
45 | Node(int pre, int suf, int x, int y, int pos, int val) : pre(pre), suf(suf), x(x), y(y), pos(pos), val(val) {}
| ~~~~^~~
horses.cpp:43:11: note: shadowed declaration is here
43 | int pre, suf, x, y, pos, val;
| ^~~
horses.cpp:45:11: warning: declaration of 'pre' shadows a member of 'Node' [-Wshadow]
45 | Node(int pre, int suf, int x, int y, int pos, int val) : pre(pre), suf(suf), x(x), y(y), pos(pos), val(val) {}
| ~~~~^~~
horses.cpp:43:6: note: shadowed declaration is here
43 | int pre, suf, x, y, pos, val;
| ^~~
horses.cpp: In constructor 'Node::Node(int, int, int, int, int, int)':
horses.cpp:45:52: warning: declaration of 'val' shadows a member of 'Node' [-Wshadow]
45 | Node(int pre, int suf, int x, int y, int pos, int val) : pre(pre), suf(suf), x(x), y(y), pos(pos), val(val) {}
| ~~~~^~~
horses.cpp:43:27: note: shadowed declaration is here
43 | int pre, suf, x, y, pos, val;
| ^~~
horses.cpp:45:43: warning: declaration of 'pos' shadows a member of 'Node' [-Wshadow]
45 | Node(int pre, int suf, int x, int y, int pos, int val) : pre(pre), suf(suf), x(x), y(y), pos(pos), val(val) {}
| ~~~~^~~
horses.cpp:43:22: note: shadowed declaration is here
43 | int pre, suf, x, y, pos, val;
| ^~~
horses.cpp:45:36: warning: declaration of 'y' shadows a member of 'Node' [-Wshadow]
45 | Node(int pre, int suf, int x, int y, int pos, int val) : pre(pre), suf(suf), x(x), y(y), pos(pos), val(val) {}
| ~~~~^
horses.cpp:43:19: note: shadowed declaration is here
43 | int pre, suf, x, y, pos, val;
| ^
horses.cpp:45:29: warning: declaration of 'x' shadows a member of 'Node' [-Wshadow]
45 | Node(int pre, int suf, int x, int y, int pos, int val) : pre(pre), suf(suf), x(x), y(y), pos(pos), val(val) {}
| ~~~~^
horses.cpp:43:16: note: shadowed declaration is here
43 | int pre, suf, x, y, pos, val;
| ^
horses.cpp:45:20: warning: declaration of 'suf' shadows a member of 'Node' [-Wshadow]
45 | Node(int pre, int suf, int x, int y, int pos, int val) : pre(pre), suf(suf), x(x), y(y), pos(pos), val(val) {}
| ~~~~^~~
horses.cpp:43:11: note: shadowed declaration is here
43 | int pre, suf, x, y, pos, val;
| ^~~
horses.cpp:45:11: warning: declaration of 'pre' shadows a member of 'Node' [-Wshadow]
45 | Node(int pre, int suf, int x, int y, int pos, int val) : pre(pre), suf(suf), x(x), y(y), pos(pos), val(val) {}
| ~~~~^~~
horses.cpp:43:6: note: shadowed declaration is here
43 | int pre, suf, x, y, pos, val;
| ^~~
horses.cpp: In function 'int comp(ll)':
horses.cpp:47:28: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
47 | int comp(ll x) { return min(x, 1LL * oo); }
| ~~~^~~~~~~~~~~~~
horses.cpp: In function 'Node comb(Node&, Node&)':
horses.cpp:65:32: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
65 | ans.val = 1LL * a.val * b.val % M;
| ~~~~~~~~~~~~~~~~~~~~^~~
horses.cpp: In function 'int get(int, int, int, int, int)':
horses.cpp:96:79: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
96 | return 1LL * get(i * 2, l, mid, ql, qr) * get(i * 2 + 1, mid + 1, r, ql, qr) % M;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:98:14: warning: declaration of 'N' shadows a global declaration [-Wshadow]
98 | int init(int N, int X[], int Y[]) {
| ~~~~^
horses.cpp:68:5: note: shadowed declaration is here
68 | int N;
| ^
horses.cpp:26:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
26 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
horses.cpp:100:2: note: in expansion of macro 'FOR'
100 | FOR(i, 0, N - 1) a[i] = {X[i], Y[i]};
| ^~~
horses.cpp:103:52: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
103 | return 1LL * get(1, 0, N - 1, 0, pos) * a[pos].nd % M;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:109:54: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
109 | return 1LL * get(1, 0, N - 1, 0, pos1) * a[pos1].nd % M;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:115:54: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
115 | return 1LL * get(1, 0, N - 1, 0, pos1) * a[pos1].nd % M;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~