roz.cpp: In function 'int main()':
roz.cpp:40:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
cin >> n >> str + 1;
~~~~^~~
roz.cpp:50:41: warning: array subscript has type 'char' [-Wchar-subscripts]
ans = max(ans, max(fr[str[i]] - fr[ch] - best[str[i]][ch], fr[ch] - fr[str[i]] - best[ch][str[i]]));
^
roz.cpp:50:65: warning: array subscript has type 'char' [-Wchar-subscripts]
ans = max(ans, max(fr[str[i]] - fr[ch] - best[str[i]][ch], fr[ch] - fr[str[i]] - best[ch][str[i]]));
^
roz.cpp:50:90: warning: array subscript has type 'char' [-Wchar-subscripts]
ans = max(ans, max(fr[str[i]] - fr[ch] - best[str[i]][ch], fr[ch] - fr[str[i]] - best[ch][str[i]]));
^
roz.cpp:50:109: warning: array subscript has type 'char' [-Wchar-subscripts]
ans = max(ans, max(fr[str[i]] - fr[ch] - best[str[i]][ch], fr[ch] - fr[str[i]] - best[ch][str[i]]));
^
roz.cpp:53:18: warning: array subscript has type 'char' [-Wchar-subscripts]
fr[str[i]]++;
^
roz.cpp:55:28: warning: array subscript has type 'char' [-Wchar-subscripts]
best[ch][str[i]] = min(best[ch][str[i]], fr[ch] - fr[str[i]]);
^
roz.cpp:55:51: warning: array subscript has type 'char' [-Wchar-subscripts]
best[ch][str[i]] = min(best[ch][str[i]], fr[ch] - fr[str[i]]);
^
roz.cpp:55:72: warning: array subscript has type 'char' [-Wchar-subscripts]
best[ch][str[i]] = min(best[ch][str[i]], fr[ch] - fr[str[i]]);
^
roz.cpp:56:24: warning: array subscript has type 'char' [-Wchar-subscripts]
best[str[i]][ch] = min(best[str[i]][ch], fr[str[i]] - fr[ch]);
^
roz.cpp:56:47: warning: array subscript has type 'char' [-Wchar-subscripts]
best[str[i]][ch] = min(best[str[i]][ch], fr[str[i]] - fr[ch]);
^
roz.cpp:56:63: warning: array subscript has type 'char' [-Wchar-subscripts]
best[str[i]][ch] = min(best[str[i]][ch], fr[str[i]] - fr[ch]);
^