scales.cpp: In constructor 'Tree::Tree(int, int, int, int, int)':
scales.cpp:23:43: warning: declaration of 'd' shadows a member of 'Tree' [-Wshadow]
23 | Tree(int ty, int a, int b, int c, int d = 0) : ty(ty), a(a), b(b), c(c), d(d) {}
| ~~~~^~~~~
scales.cpp:20:22: note: shadowed declaration is here
20 | int ty, a, b, c, d;
| ^
scales.cpp:23:36: warning: declaration of 'c' shadows a member of 'Tree' [-Wshadow]
23 | Tree(int ty, int a, int b, int c, int d = 0) : ty(ty), a(a), b(b), c(c), d(d) {}
| ~~~~^
scales.cpp:20:19: note: shadowed declaration is here
20 | int ty, a, b, c, d;
| ^
scales.cpp:23:29: warning: declaration of 'b' shadows a member of 'Tree' [-Wshadow]
23 | Tree(int ty, int a, int b, int c, int d = 0) : ty(ty), a(a), b(b), c(c), d(d) {}
| ~~~~^
scales.cpp:20:16: note: shadowed declaration is here
20 | int ty, a, b, c, d;
| ^
scales.cpp:23:22: warning: declaration of 'a' shadows a member of 'Tree' [-Wshadow]
23 | Tree(int ty, int a, int b, int c, int d = 0) : ty(ty), a(a), b(b), c(c), d(d) {}
| ~~~~^
scales.cpp:20:13: note: shadowed declaration is here
20 | int ty, a, b, c, d;
| ^
scales.cpp:23:14: warning: declaration of 'ty' shadows a member of 'Tree' [-Wshadow]
23 | Tree(int ty, int a, int b, int c, int d = 0) : ty(ty), a(a), b(b), c(c), d(d) {}
| ~~~~^~
scales.cpp:20:9: note: shadowed declaration is here
20 | int ty, a, b, c, d;
| ^~
scales.cpp: In constructor 'Tree::Tree(int, int, int, int, int)':
scales.cpp:23:43: warning: declaration of 'd' shadows a member of 'Tree' [-Wshadow]
23 | Tree(int ty, int a, int b, int c, int d = 0) : ty(ty), a(a), b(b), c(c), d(d) {}
| ~~~~^~~~~
scales.cpp:20:22: note: shadowed declaration is here
20 | int ty, a, b, c, d;
| ^
scales.cpp:23:36: warning: declaration of 'c' shadows a member of 'Tree' [-Wshadow]
23 | Tree(int ty, int a, int b, int c, int d = 0) : ty(ty), a(a), b(b), c(c), d(d) {}
| ~~~~^
scales.cpp:20:19: note: shadowed declaration is here
20 | int ty, a, b, c, d;
| ^
scales.cpp:23:29: warning: declaration of 'b' shadows a member of 'Tree' [-Wshadow]
23 | Tree(int ty, int a, int b, int c, int d = 0) : ty(ty), a(a), b(b), c(c), d(d) {}
| ~~~~^
scales.cpp:20:16: note: shadowed declaration is here
20 | int ty, a, b, c, d;
| ^
scales.cpp:23:22: warning: declaration of 'a' shadows a member of 'Tree' [-Wshadow]
23 | Tree(int ty, int a, int b, int c, int d = 0) : ty(ty), a(a), b(b), c(c), d(d) {}
| ~~~~^
scales.cpp:20:13: note: shadowed declaration is here
20 | int ty, a, b, c, d;
| ^
scales.cpp:23:14: warning: declaration of 'ty' shadows a member of 'Tree' [-Wshadow]
23 | Tree(int ty, int a, int b, int c, int d = 0) : ty(ty), a(a), b(b), c(c), d(d) {}
| ~~~~^~
scales.cpp:20:9: note: shadowed declaration is here
20 | int ty, a, b, c, d;
| ^~
scales.cpp: In constructor 'Tree::Tree(int, int, int, int, int)':
scales.cpp:23:43: warning: declaration of 'd' shadows a member of 'Tree' [-Wshadow]
23 | Tree(int ty, int a, int b, int c, int d = 0) : ty(ty), a(a), b(b), c(c), d(d) {}
| ~~~~^~~~~
scales.cpp:20:22: note: shadowed declaration is here
20 | int ty, a, b, c, d;
| ^
scales.cpp:23:36: warning: declaration of 'c' shadows a member of 'Tree' [-Wshadow]
23 | Tree(int ty, int a, int b, int c, int d = 0) : ty(ty), a(a), b(b), c(c), d(d) {}
| ~~~~^
scales.cpp:20:19: note: shadowed declaration is here
20 | int ty, a, b, c, d;
| ^
scales.cpp:23:29: warning: declaration of 'b' shadows a member of 'Tree' [-Wshadow]
23 | Tree(int ty, int a, int b, int c, int d = 0) : ty(ty), a(a), b(b), c(c), d(d) {}
| ~~~~^
scales.cpp:20:16: note: shadowed declaration is here
20 | int ty, a, b, c, d;
| ^
scales.cpp:23:22: warning: declaration of 'a' shadows a member of 'Tree' [-Wshadow]
23 | Tree(int ty, int a, int b, int c, int d = 0) : ty(ty), a(a), b(b), c(c), d(d) {}
| ~~~~^
scales.cpp:20:13: note: shadowed declaration is here
20 | int ty, a, b, c, d;
| ^
scales.cpp:23:14: warning: declaration of 'ty' shadows a member of 'Tree' [-Wshadow]
23 | Tree(int ty, int a, int b, int c, int d = 0) : ty(ty), a(a), b(b), c(c), d(d) {}
| ~~~~^~
scales.cpp:20:9: note: shadowed declaration is here
20 | int ty, a, b, c, d;
| ^~
scales.cpp: In function 'bool build(Tree*&, std::vector<int>, int)':
scales.cpp:9:36: warning: declaration of 'I' shadows a previous local [-Wshadow]
9 | #define FOR(x,a,b) for (int x = a, I = b; x <= I; x++)
| ^
scales.cpp:33:20: note: in expansion of macro 'FOR'
33 | FOR (ty, 1, 3) FOR (i, 1, 6) FOR (j, i + 1, 6) FOR (k, j + 1, 6) {
| ^~~
scales.cpp:9:36: note: shadowed declaration is here
9 | #define FOR(x,a,b) for (int x = a, I = b; x <= I; x++)
| ^
scales.cpp:33:5: note: in expansion of macro 'FOR'
33 | FOR (ty, 1, 3) FOR (i, 1, 6) FOR (j, i + 1, 6) FOR (k, j + 1, 6) {
| ^~~
scales.cpp:9:36: warning: declaration of 'I' shadows a previous local [-Wshadow]
9 | #define FOR(x,a,b) for (int x = a, I = b; x <= I; x++)
| ^
scales.cpp:33:34: note: in expansion of macro 'FOR'
33 | FOR (ty, 1, 3) FOR (i, 1, 6) FOR (j, i + 1, 6) FOR (k, j + 1, 6) {
| ^~~
scales.cpp:9:36: note: shadowed declaration is here
9 | #define FOR(x,a,b) for (int x = a, I = b; x <= I; x++)
| ^
scales.cpp:33:20: note: in expansion of macro 'FOR'
33 | FOR (ty, 1, 3) FOR (i, 1, 6) FOR (j, i + 1, 6) FOR (k, j + 1, 6) {
| ^~~
scales.cpp:9:36: warning: declaration of 'I' shadows a previous local [-Wshadow]
9 | #define FOR(x,a,b) for (int x = a, I = b; x <= I; x++)
| ^
scales.cpp:33:52: note: in expansion of macro 'FOR'
33 | FOR (ty, 1, 3) FOR (i, 1, 6) FOR (j, i + 1, 6) FOR (k, j + 1, 6) {
| ^~~
scales.cpp:9:36: note: shadowed declaration is here
9 | #define FOR(x,a,b) for (int x = a, I = b; x <= I; x++)
| ^
scales.cpp:33:34: note: in expansion of macro 'FOR'
33 | FOR (ty, 1, 3) FOR (i, 1, 6) FOR (j, i + 1, 6) FOR (k, j + 1, 6) {
| ^~~
scales.cpp:43:56: warning: comparison of integer expressions of different signedness: 'long unsigned int' and 'int' [-Wsign-compare]
43 | if (max({vi.size(), vj.size(), vk.size()}) > lim) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
scales.cpp:9:36: warning: declaration of 'I' shadows a previous local [-Wshadow]
9 | #define FOR(x,a,b) for (int x = a, I = b; x <= I; x++)
| ^
scales.cpp:53:19: note: in expansion of macro 'FOR'
53 | FOR (d, 1, 6) FOR (i, 1, 6) if (i != d) FOR (j, i + 1, 6) if (j != d) FOR (k, j + 1, 6) if (k != d) {
| ^~~
scales.cpp:9:36: note: shadowed declaration is here
9 | #define FOR(x,a,b) for (int x = a, I = b; x <= I; x++)
| ^
scales.cpp:53:5: note: in expansion of macro 'FOR'
53 | FOR (d, 1, 6) FOR (i, 1, 6) if (i != d) FOR (j, i + 1, 6) if (j != d) FOR (k, j + 1, 6) if (k != d) {
| ^~~
scales.cpp:9:36: warning: declaration of 'I' shadows a previous local [-Wshadow]
9 | #define FOR(x,a,b) for (int x = a, I = b; x <= I; x++)
| ^
scales.cpp:53:45: note: in expansion of macro 'FOR'
53 | FOR (d, 1, 6) FOR (i, 1, 6) if (i != d) FOR (j, i + 1, 6) if (j != d) FOR (k, j + 1, 6) if (k != d) {
| ^~~
scales.cpp:9:36: note: shadowed declaration is here
9 | #define FOR(x,a,b) for (int x = a, I = b; x <= I; x++)
| ^
scales.cpp:53:19: note: in expansion of macro 'FOR'
53 | FOR (d, 1, 6) FOR (i, 1, 6) if (i != d) FOR (j, i + 1, 6) if (j != d) FOR (k, j + 1, 6) if (k != d) {
| ^~~
scales.cpp:9:36: warning: declaration of 'I' shadows a previous local [-Wshadow]
9 | #define FOR(x,a,b) for (int x = a, I = b; x <= I; x++)
| ^
scales.cpp:53:75: note: in expansion of macro 'FOR'
53 | FOR (d, 1, 6) FOR (i, 1, 6) if (i != d) FOR (j, i + 1, 6) if (j != d) FOR (k, j + 1, 6) if (k != d) {
| ^~~
scales.cpp:9:36: note: shadowed declaration is here
9 | #define FOR(x,a,b) for (int x = a, I = b; x <= I; x++)
| ^
scales.cpp:53:45: note: in expansion of macro 'FOR'
53 | FOR (d, 1, 6) FOR (i, 1, 6) if (i != d) FOR (j, i + 1, 6) if (j != d) FOR (k, j + 1, 6) if (k != d) {
| ^~~
scales.cpp:62:56: warning: comparison of integer expressions of different signedness: 'long unsigned int' and 'int' [-Wsign-compare]
62 | if (max({vi.size(), vj.size(), vk.size()}) > lim) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
scales.cpp: In function 'void init(int)':
scales.cpp:9:36: warning: declaration of 'I' shadows a previous local [-Wshadow]
9 | #define FOR(x,a,b) for (int x = a, I = b; x <= I; x++)
| ^
scales.cpp:81:9: note: in expansion of macro 'FOR'
81 | FOR (j, 0, 5) pos[i][a[j]] = j;
| ^~~
scales.cpp:9:36: note: shadowed declaration is here
9 | #define FOR(x,a,b) for (int x = a, I = b; x <= I; x++)
| ^
scales.cpp:79:5: note: in expansion of macro 'FOR'
79 | FOR (i, 0, MAX - 1) {
| ^~~
scales.cpp:76:15: warning: unused parameter 'T' [-Wunused-parameter]
76 | void init(int T) {
| ~~~~^
scales.cpp: In function 'void orderCoins()':
scales.cpp:114:56: warning: 'result' may be used uninitialized in this function [-Wmaybe-uninitialized]
114 | cur = (result == a ? cur->nxt[0] : result == b ? cur->nxt[1] : cur->nxt[2]);
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~