teams.cpp: In function 'void read(T&)':
teams.cpp:12:18: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
12 | register int c;
| ^
teams.cpp: In constructor 'node::node(node*, node*, int)':
teams.cpp:28:52: warning: declaration of 'cnt' shadows a member of 'node' [-Wshadow]
28 | node(node *l = nullptr, node *r = nullptr, int cnt = 0) : l(l), r(r), cnt(cnt) {}
| ~~~~^~~~~~~
teams.cpp:26:9: note: shadowed declaration is here
26 | int cnt;
| ^~~
teams.cpp:28:35: warning: declaration of 'r' shadows a member of 'node' [-Wshadow]
28 | node(node *l = nullptr, node *r = nullptr, int cnt = 0) : l(l), r(r), cnt(cnt) {}
| ~~~~~~^~~~~~~~~~~
teams.cpp:27:15: note: shadowed declaration is here
27 | node *l, *r;
| ^
teams.cpp:28:16: warning: declaration of 'l' shadows a member of 'node' [-Wshadow]
28 | node(node *l = nullptr, node *r = nullptr, int cnt = 0) : l(l), r(r), cnt(cnt) {}
| ~~~~~~^~~~~~~~~~~
teams.cpp:27:11: note: shadowed declaration is here
27 | node *l, *r;
| ^
teams.cpp:27:15: warning: 'node::r' will be initialized after [-Wreorder]
27 | node *l, *r;
| ^
teams.cpp:26:9: warning: 'int node::cnt' [-Wreorder]
26 | int cnt;
| ^~~
teams.cpp:28:5: warning: when initialized here [-Wreorder]
28 | node(node *l = nullptr, node *r = nullptr, int cnt = 0) : l(l), r(r), cnt(cnt) {}
| ^~~~
teams.cpp: In constructor 'node::node(node*, node*, int)':
teams.cpp:28:52: warning: declaration of 'cnt' shadows a member of 'node' [-Wshadow]
28 | node(node *l = nullptr, node *r = nullptr, int cnt = 0) : l(l), r(r), cnt(cnt) {}
| ~~~~^~~~~~~
teams.cpp:26:9: note: shadowed declaration is here
26 | int cnt;
| ^~~
teams.cpp:28:35: warning: declaration of 'r' shadows a member of 'node' [-Wshadow]
28 | node(node *l = nullptr, node *r = nullptr, int cnt = 0) : l(l), r(r), cnt(cnt) {}
| ~~~~~~^~~~~~~~~~~
teams.cpp:27:15: note: shadowed declaration is here
27 | node *l, *r;
| ^
teams.cpp:28:16: warning: declaration of 'l' shadows a member of 'node' [-Wshadow]
28 | node(node *l = nullptr, node *r = nullptr, int cnt = 0) : l(l), r(r), cnt(cnt) {}
| ~~~~~~^~~~~~~~~~~
teams.cpp:27:11: note: shadowed declaration is here
27 | node *l, *r;
| ^
teams.cpp: In constructor 'node::node(node*, node*, int)':
teams.cpp:28:52: warning: declaration of 'cnt' shadows a member of 'node' [-Wshadow]
28 | node(node *l = nullptr, node *r = nullptr, int cnt = 0) : l(l), r(r), cnt(cnt) {}
| ~~~~^~~~~~~
teams.cpp:26:9: note: shadowed declaration is here
26 | int cnt;
| ^~~
teams.cpp:28:35: warning: declaration of 'r' shadows a member of 'node' [-Wshadow]
28 | node(node *l = nullptr, node *r = nullptr, int cnt = 0) : l(l), r(r), cnt(cnt) {}
| ~~~~~~^~~~~~~~~~~
teams.cpp:27:15: note: shadowed declaration is here
27 | node *l, *r;
| ^
teams.cpp:28:16: warning: declaration of 'l' shadows a member of 'node' [-Wshadow]
28 | node(node *l = nullptr, node *r = nullptr, int cnt = 0) : l(l), r(r), cnt(cnt) {}
| ~~~~~~^~~~~~~~~~~
teams.cpp:27:11: note: shadowed declaration is here
27 | node *l, *r;
| ^
teams.cpp: In function 'int Get(node*, int, int, const int&, const int&)':
teams.cpp:92:44: warning: declaration of 'a' shadows a global declaration [-Wshadow]
92 | int Get(node *st, int l, int r, const int &a, const int &b)
| ~~~~~~~~~~~^
teams.cpp:35:8: note: shadowed declaration is here
35 | int n, a[M], id[N];
| ^
teams.cpp: In function 'int Cal(int, int)':
teams.cpp:104:78: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
104 | return dp[x] + Get(f[a[y]], 1, n, a[y], n) - Get(f[a[x]], 1, n, a[y], n) - a[y];
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~