match.cpp: In function 'void solve(int, int)':
match.cpp:35:33: warning: array subscript has type 'char' [-Wchar-subscripts]
int m = e - pr[e][str[e]];
^
match.cpp: In function 'int main()':
match.cpp:57:47: warning: array subscript has type 'char' [-Wchar-subscripts]
if (str[i - 1] == str[i]) pr[i][str[i]] = 1;
^
match.cpp:58:26: warning: array subscript has type 'char' [-Wchar-subscripts]
else pr[i][str[i]] = pr[i - 1][str[i]] + 1;
^
match.cpp:58:46: warning: array subscript has type 'char' [-Wchar-subscripts]
else pr[i][str[i]] = pr[i - 1][str[i]] + 1;
^
match.cpp:61:34: warning: array subscript has type 'char' [-Wchar-subscripts]
if (i <= pr[i][str[i]]) pr[i][j] = i + 1;
^
match.cpp:62:42: warning: array subscript has type 'char' [-Wchar-subscripts]
else if (str[i - pr[i][str[i]] - 1] == j) pr[i][j] = pr[i][str[i]] + 1;
^
match.cpp:62:78: warning: array subscript has type 'char' [-Wchar-subscripts]
else if (str[i - pr[i][str[i]] - 1] == j) pr[i][j] = pr[i][str[i]] + 1;
^
match.cpp:64:47: warning: array subscript has type 'char' [-Wchar-subscripts]
pr[i][j] = pr[i - pr[i][str[i]] - 1][j] + pr[i][str[i]] + 1;
^
match.cpp:64:71: warning: array subscript has type 'char' [-Wchar-subscripts]
pr[i][j] = pr[i - pr[i][str[i]] - 1][j] + pr[i][str[i]] + 1;
^
match.cpp:68:15: warning: format not a string literal and no format arguments [-Wformat-security]
printf(ans);
^
match.cpp:42:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s", str);
~~~~~^~~~~~~~~~~