beechtree.cpp: In function 'bool check(int, int)':
beechtree.cpp:11:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
11 | for (int i = 0, j = 0; i < g[u].size(); i++) {
| ~~^~~~~~~~~~~~~
beechtree.cpp:12:12: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
12 | while (j < g[v].size() && g[v][j].first != g[u][i].first) j++;
| ~~^~~~~~~~~~~~~
beechtree.cpp:13:9: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
13 | if (j == g[v].size()) return dp[v][u] = 0;
| ~~^~~~~~~~~~~~~~
beechtree.cpp:13:41: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
13 | if (j == g[v].size()) return dp[v][u] = 0;
beechtree.cpp:14:64: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
14 | if (!check (g[v][j].second, g[u][i].second)) return dp[v][u] = 0;
beechtree.cpp:16:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
16 | return dp[v][u] = 1;
beechtree.cpp: In function 'void dfs(int)':
beechtree.cpp:23:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
23 | for (int i = 0; i + 1 < g[v].size(); i++) ans[v] &= (g[v][i].first != g[v][i + 1].first);
| ~~~~~~^~~~~~~~~~~~~
beechtree.cpp:33:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
33 | for (int i = 0; i < a.size() - 1; i++) ans[v] &= check (a[i], a[i + 1]);
| ~~^~~~~~~~~~~~~~