werewolf.cpp: In function 'void kdfs(int, int)':
werewolf.cpp:5:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
5 | #define rep(n) for (int i=0; i<n; i++)
| ~^~~~~~~~
6 | const int c=200002;
| ~~~~~~~~~~~~~~~~~~~
7 | int m, q, hely[c], mini[c][20], maxi[c][20], cnt;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8 | vi sz[c], sol;
| ~~~~~~~~~~~~~~
9 | bool kis[c], nagy[c], v[c], jo;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 | void kdfs(int a, int b) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~
11 | kis[a]=1;
| ~~~~~~~~~
12 | rep(sz[a].size()) {
| ~~~~~~~~~~~~~~~~
werewolf.cpp:12:5: note: in expansion of macro 'rep'
12 | rep(sz[a].size()) {
| ^~~
werewolf.cpp: In function 'void ndfs(int, int)':
werewolf.cpp:5:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
5 | #define rep(n) for (int i=0; i<n; i++)
| ~^~~~~~~~
6 | const int c=200002;
| ~~~~~~~~~~~~~~~~~~~
7 | int m, q, hely[c], mini[c][20], maxi[c][20], cnt;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8 | vi sz[c], sol;
| ~~~~~~~~~~~~~~
9 | bool kis[c], nagy[c], v[c], jo;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 | void kdfs(int a, int b) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~
11 | kis[a]=1;
| ~~~~~~~~~
12 | rep(sz[a].size()) {
| ~~~~~~~~~~~~~~~~~~~
13 | int x=sz[a][i];
| ~~~~~~~~~~~~~~~
14 | if (!kis[x] && x<=b) kdfs(x, b);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 | }
| ~
16 | }
| ~
17 | void ndfs(int a, int b) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~
18 | nagy[a]=1;
| ~~~~~~~~~~
19 | rep(sz[a].size()) {
| ~~~~~~~~~~~~~~~~
werewolf.cpp:19:5: note: in expansion of macro 'rep'
19 | rep(sz[a].size()) {
| ^~~
werewolf.cpp: In function 'void dfs(int)':
werewolf.cpp:5:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
5 | #define rep(n) for (int i=0; i<n; i++)
| ~^~~~~~~~
6 | const int c=200002;
| ~~~~~~~~~~~~~~~~~~~
7 | int m, q, hely[c], mini[c][20], maxi[c][20], cnt;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8 | vi sz[c], sol;
| ~~~~~~~~~~~~~~
9 | bool kis[c], nagy[c], v[c], jo;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 | void kdfs(int a, int b) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~
11 | kis[a]=1;
| ~~~~~~~~~
12 | rep(sz[a].size()) {
| ~~~~~~~~~~~~~~~~~~~
13 | int x=sz[a][i];
| ~~~~~~~~~~~~~~~
14 | if (!kis[x] && x<=b) kdfs(x, b);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 | }
| ~
16 | }
| ~
17 | void ndfs(int a, int b) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~
18 | nagy[a]=1;
| ~~~~~~~~~~
19 | rep(sz[a].size()) {
| ~~~~~~~~~~~~~~~~~~~
20 | int x=sz[a][i];
| ~~~~~~~~~~~~~~~
21 | if (!nagy[x] && x>=b) ndfs(x, b);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 | }
| ~
23 | }
| ~
24 | void dfs(int a) {
| ~~~~~~~~~~~~~~~~~
25 | v[a]=true, mini[cnt][0]=a, maxi[cnt][0]=a, hely[a]=cnt, cnt++;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 | rep(sz[a].size()) {
| ~~~~~~~~~~~~~~~~
werewolf.cpp:26:5: note: in expansion of macro 'rep'
26 | rep(sz[a].size()) {
| ^~~