roz.cpp: In function 'int main()':
roz.cpp:41:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
cin >> n >> str + 1;
~~~~^~~
roz.cpp:46:18: warning: array subscript has type 'char' [-Wchar-subscripts]
fr[str[i]]++, last[str[i]] = i;
^
roz.cpp:46:34: warning: array subscript has type 'char' [-Wchar-subscripts]
fr[str[i]]++, last[str[i]] = i;
^
roz.cpp:53:37: warning: array subscript has type 'char' [-Wchar-subscripts]
ans = max(ans, fr[str[i]] - fr[ch] - best[str[i]][ch] - (last[ch] <= pos[str[i]][ch]));
^
roz.cpp:53:61: warning: array subscript has type 'char' [-Wchar-subscripts]
ans = max(ans, fr[str[i]] - fr[ch] - best[str[i]][ch] - (last[ch] <= pos[str[i]][ch]));
^
roz.cpp:53:92: warning: array subscript has type 'char' [-Wchar-subscripts]
ans = max(ans, fr[str[i]] - fr[ch] - best[str[i]][ch] - (last[ch] <= pos[str[i]][ch]));
^
roz.cpp:54:46: warning: array subscript has type 'char' [-Wchar-subscripts]
ans = max(ans, fr[ch] - fr[str[i]] - best[ch][str[i]] - (last[str[i]] <= pos[ch][str[i]]));
^
roz.cpp:54:65: warning: array subscript has type 'char' [-Wchar-subscripts]
ans = max(ans, fr[ch] - fr[str[i]] - best[ch][str[i]] - (last[str[i]] <= pos[ch][str[i]]));
^
roz.cpp:54:81: warning: array subscript has type 'char' [-Wchar-subscripts]
ans = max(ans, fr[ch] - fr[str[i]] - best[ch][str[i]] - (last[str[i]] <= pos[ch][str[i]]));
^
roz.cpp:54:100: warning: array subscript has type 'char' [-Wchar-subscripts]
ans = max(ans, fr[ch] - fr[str[i]] - best[ch][str[i]] - (last[str[i]] <= pos[ch][str[i]]));
^
roz.cpp:59:31: warning: array subscript has type 'char' [-Wchar-subscripts]
if(best[ch][str[i]] > fr[ch] - fr[str[i]]) {
^
roz.cpp:59:53: warning: array subscript has type 'char' [-Wchar-subscripts]
if(best[ch][str[i]] > fr[ch] - fr[str[i]]) {
^
roz.cpp:60:32: warning: array subscript has type 'char' [-Wchar-subscripts]
best[ch][str[i]] = fr[ch] - fr[str[i]];
^
roz.cpp:60:54: warning: array subscript has type 'char' [-Wchar-subscripts]
best[ch][str[i]] = fr[ch] - fr[str[i]];
^
roz.cpp:61:31: warning: array subscript has type 'char' [-Wchar-subscripts]
pos[ch][str[i]] = i;
^
roz.cpp:63:27: warning: array subscript has type 'char' [-Wchar-subscripts]
if(best[str[i]][ch] > fr[str[i]] - fr[ch]) {
^
roz.cpp:63:44: warning: array subscript has type 'char' [-Wchar-subscripts]
if(best[str[i]][ch] > fr[str[i]] - fr[ch]) {
^
roz.cpp:64:28: warning: array subscript has type 'char' [-Wchar-subscripts]
best[str[i]][ch] = fr[str[i]] - fr[ch];
^
roz.cpp:64:45: warning: array subscript has type 'char' [-Wchar-subscripts]
best[str[i]][ch] = fr[str[i]] - fr[ch];
^
roz.cpp:65:27: warning: array subscript has type 'char' [-Wchar-subscripts]
pos[str[i]][ch] = i;
^