运行 ID: 37726

Main.cc: In function ‘int getcnt(int, int, char)’:
Main.cc:15:17: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     return cnt[c][r] - cnt[c][l - 1];
                 ^
Main.cc:15:29: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     return cnt[c][r] - cnt[c][l - 1];
                             ^
Main.cc: In function ‘void solve()’:
Main.cc:126:18: warning: array subscript has type ‘char’ [-Wchar-subscripts]
             cnt[j][i] = cnt[j][i - 1];
                  ^
Main.cc:126:30: warning: array subscript has type ‘char’ [-Wchar-subscripts]
             cnt[j][i] = cnt[j][i - 1];
                              ^
Main.cc:127:17: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         cnt[s[i]][i]++;
                 ^
Main.cc: At global scope:
Main.cc:157:5: error: expected initializer before ‘int’
     int T;
     ^~~
Main.cc:158:5: error: ‘cin’ does not name a type; did you mean ‘sin’?
     cin >> T;
     ^~~
     sin
Main.cc:159:5: error: expected unqualified-id before ‘for’
     for (int i = 1; i <= T; i++)
     ^~~
Main.cc:159:21: error: ‘i’ does not name a type
     for (int i = 1; i <= T; i++)
                     ^
Main.cc:159:29: error: ‘i’ does not name a type
     for (int i = 1; i <= T; i++)
                             ^
Main.cc:164:5: error: expected unqualified-id before ‘return’
     return 0;
     ^~~~~~
Main.cc:165:1: error: expected declaration before ‘}’ token
 }
 ^
Main.cc: In function ‘void solve()’:
Main.cc:121:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%s", &m, s + 1);
     ~~~~~^~~~~~~~~~~~~~~~~~~