foo.cc: In function 'void calc(int, int, int, int, int)':
foo.cc:73:41: 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:27: 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:12: warning: unused variable 'rec' [-Wunused-variable]
98 | long long rec=ans;
| ^~~
foo.cc:99:7: warning: unused variable 'flag' [-Wunused-variable]
99 | bool flag=0;
| ^~~~
foo.cc: In function 'int main()':
foo.cc:128:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
128 | scanf("%s",a+1);
| ~~~~~^~~~~~~~~~
foo.cc:131:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
131 | scanf("%s",s[0]+1);
| ~~~~~^~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务