tickets.cpp: In function 'll subtask1::find_maximum(int, std::vector<std::vector<int> >&)':
tickets.cpp:29:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
29 | #define EACH(i, x) for (auto &(i) : (x))
| ^
tickets.cpp:44:3: note: in expansion of macro 'EACH'
44 | EACH(i, x) a.pb(i[0]);
| ^~~~
tickets.cpp:29:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
29 | #define EACH(i, x) for (auto &(i) : (x))
| ^
tickets.cpp:47:3: note: in expansion of macro 'EACH'
47 | EACH(i, a) rs += abs(i - med);
| ^~~~
tickets.cpp:29:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
29 | #define EACH(i, x) for (auto &(i) : (x))
| ^
tickets.cpp:48:3: note: in expansion of macro 'EACH'
48 | EACH(i, x)
| ^~~~
tickets.cpp:29:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
29 | #define EACH(i, x) for (auto &(i) : (x))
| ^
tickets.cpp:49:3: note: in expansion of macro 'EACH'
49 | EACH(j, i)
| ^~~~
tickets.cpp: In function 'll subtask2::find_maximum(int, std::vector<std::vector<int> >&)':
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:60:3: note: in expansion of macro 'FOR'
60 | FOR(i, 0, n - 1) rs -= x[i][0];
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:62:3: note: in expansion of macro 'FOR'
62 | FOR(i, 0, n - 1) a[i] = {x[i][m - 1] + x[i][0], i};
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:64:3: note: in expansion of macro 'FOR'
64 | FOR(i, 0, n - 1)
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:65:3: note: in expansion of macro 'FOR'
65 | FOR(j, 0, m - 1)
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:67:3: note: in expansion of macro 'FOR'
67 | FOR(i, 0, n / 2 - 1) {
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:71:3: note: in expansion of macro 'FOR'
71 | FOR(i, n / 2, n - 1) x[a[i].nd][0] = 0;
| ^~~
tickets.cpp: In function 'std::vector<std::vector<int> > getorder(int, std::vector<std::vector<int> >&)':
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:80:2: note: in expansion of macro 'FOR'
80 | FOR(i, 0, n - 1)
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:81:2: note: in expansion of macro 'FOR'
81 | FOR(j, 0, m - 1)
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:84:2: note: in expansion of macro 'FOR'
84 | FOR(i, 0, n - 1) {
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:86:3: note: in expansion of macro 'FOR'
86 | FOR(j, 0, m - 1)
| ^~~
tickets.cpp:29:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
29 | #define EACH(i, x) for (auto &(i) : (x))
| ^
tickets.cpp:89:3: note: in expansion of macro 'EACH'
89 | EACH(j, a) {
| ^~~~
tickets.cpp:29:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
29 | #define EACH(i, x) for (auto &(i) : (x))
| ^
tickets.cpp:95:3: note: in expansion of macro 'EACH'
95 | EACH(j, b) {
| ^~~~
tickets.cpp: In function 'll subtask3::find_maximum(int, std::vector<std::vector<int> >&)':
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:108:3: note: in expansion of macro 'FOR'
108 | FOR(i, 0, n - 1) {
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:110:4: note: in expansion of macro 'FOR'
110 | FOR(j, 0, m - 1) sum += x[i][j];
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:115:3: note: in expansion of macro 'FOR'
115 | FOR(i, 0, n - 1) x[i] = x1[a[i].nd];
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:118:3: note: in expansion of macro 'FOR'
118 | FOR(i, 0, n - 1) {
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:120:4: note: in expansion of macro 'FOR'
120 | FOR(j, 0, m - 1) {
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:127:4: note: in expansion of macro 'FOR'
127 | FOR(j, 0, pos) rs -= x[i][j];
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:128:4: note: in expansion of macro 'FOR'
128 | FOR(j, m - k + pos + 1, m - 1) rs += x[i][j];
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:129:4: note: in expansion of macro 'FOR'
129 | FOR(j, 0, m - 1) x[i][j] = -1;
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:130:4: note: in expansion of macro 'FOR'
130 | FOR(j, 0, pos) x[i][j] = 0;
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:131:4: note: in expansion of macro 'FOR'
131 | FOR(j, m - k + pos + 1, m - 1) x[i][j] = 1;
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:135:3: note: in expansion of macro 'FOR'
135 | FOR(i, 0, n - 1) pos[a[i].nd] = i;
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:136:3: note: in expansion of macro 'FOR'
136 | FOR(i, 0, n - 1) x[i] = x1[pos[i]];
| ^~~
tickets.cpp: In function 'll subtask4::find_maximum(int, std::vector<std::vector<int> >&)':
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:153:3: note: in expansion of macro 'FOR'
153 | FOR(i, 0, n - 1)
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:154:3: note: in expansion of macro 'FOR'
154 | FOR(j, 0, m - 1)
| ^~~
tickets.cpp:29:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
29 | #define EACH(i, x) for (auto &(i) : (x))
| ^
tickets.cpp:158:3: note: in expansion of macro 'EACH'
158 | EACH(i, a) rs += i.a;
| ^~~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:159:3: note: in expansion of macro 'FOR'
159 | FOR(i, 0, cnt - 1) rs -= 2 * a[i].a;
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:160:3: note: in expansion of macro 'FOR'
160 | FOR(i, 0, n - 1)
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:161:3: note: in expansion of macro 'FOR'
161 | FOR(j, 0, m - 1)
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:163:3: note: in expansion of macro 'FOR'
163 | FOR(i, 0, cnt - 1) x[a[i].i][a[i].j] = 0;
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:164:3: note: in expansion of macro 'FOR'
164 | FOR(i, cnt, n * m - 1) x[a[i].i][a[i].j] = 1;
| ^~~
tickets.cpp: In function 'void subtask5::trace(int, int, std::vector<std::vector<int> >&)':
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'z' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:177:3: note: in expansion of macro 'FOR'
177 | FOR(z, 0, cnt - 1) x[i][z] = 0;
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'z' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:178:3: note: in expansion of macro 'FOR'
178 | FOR(z, m - k + cnt, m - 1) x[i][z] = 1;
| ^~~
tickets.cpp:178:10: error: 'm' was not declared in this scope
178 | FOR(z, m - k + cnt, m - 1) x[i][z] = 1;
| ^
tickets.cpp:27:38: note: in definition of macro 'FOR'
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:178:14: error: 'k' was not declared in this scope
178 | FOR(z, m - k + cnt, m - 1) x[i][z] = 1;
| ^
tickets.cpp:27:38: note: in definition of macro 'FOR'
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp: In function 'll subtask5::find_maximum(int, std::vector<std::vector<int> >&)':
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:185:3: note: in expansion of macro 'FOR'
185 | FOR(i, 0, n - 1) {
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:186:4: note: in expansion of macro 'FOR'
186 | FOR(j, m - k, m - 1) a[i][0] += x[i][j];
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:187:4: note: in expansion of macro 'FOR'
187 | FOR(j, 1, k) a[i][j] = a[i][j - 1] - x[i][j - 1] + x[i][m - j];
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:189:3: note: in expansion of macro 'FOR'
189 | FOR(i, 0, n - 1)
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:190:3: note: in expansion of macro 'FOR'
190 | FOR(j, 0, cnt) {
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'z' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:192:4: note: in expansion of macro 'FOR'
192 | FOR(z, 0, min(j, k))
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:198:3: note: in expansion of macro 'FOR'
198 | FOR(i, 0, n - 1)
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:199:3: note: in expansion of macro 'FOR'
199 | FOR(j, 0, m - 1)
| ^~~
tickets.cpp: In function 'long long int find_maximum(int, std::vector<std::vector<int> >)':
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:212:2: note: in expansion of macro 'FOR'
212 | FOR(i, 0, n - 1)
| ^~~
tickets.cpp:27:31: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
27 | #define FOR(i, l, r) for (int (i) = (l); (i) <= (r); ++(i))
| ^
tickets.cpp:213:2: note: in expansion of macro 'FOR'
213 | FOR(j, 0, m - 1)
| ^~~