foo.cc: In function 'void solve()':
foo.cc:85:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for(int i = 1 ; i <= n ; ++i) head[i] = 0 , vis[i] = 0; cnt = 0; ans = 0;
^~~
foo.cc:85:58: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
for(int i = 1 ; i <= n ; ++i) head[i] = 0 , vis[i] = 0; cnt = 0; ans = 0;
^~~
foo.cc: In function 'int main()':
foo.cc:93:6: warning: unused variable 'T' [-Wunused-variable]
int T = read(); /*while(T --)*/ solve();
^
foo.cc: In function 'void solve()':
foo.cc:70:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s",a + 1);
~~~~~^~~~~~~~~~~~
foo.cc:76:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s",b + 1); bs[0] = 1;
~~~~~^~~~~~~~~~~~