foo.cc: In function 'void calc(int, int, int, int, int)':
foo.cc:73:48: warning: array subscript has type 'char' [-Wchar-subscripts]
73 | q[++tail]=node,sam=S[id].son(sam,a[node]);
| ~~~~~~^
foo.cc:22:25: note: in definition of macro 'son'
22 | #define son(x,y) son[x][y]
| ^
foo.cc: In function 'void solve(int)':
foo.cc:97:34: warning: array subscript has type 'char' [-Wchar-subscripts]
97 | int sam=S[1].son(1,a[node]),len=(s[1][1]==a[node]),last=1;
| ~~~~~~^
foo.cc:22:25: note: in definition of macro 'son'
22 | #define son(x,y) son[x][y]
| ^
foo.cc:98:19: warning: unused variable 'rec' [-Wunused-variable]
98 | long long rec=ans;
| ^~~
foo.cc:99:14: warning: unused variable 'flag' [-Wunused-variable]
99 | bool flag=0;
| ^~~~
[Hydro](https://hydro.ac)提供评测服务