match.cpp: In function 'int find_last(char, char, int, int)':
match.cpp:30:13: warning: array subscript has type 'char' [-Wchar-subscripts]
if(pos[f][s].empty()) return -1;
^
match.cpp:30:16: warning: array subscript has type 'char' [-Wchar-subscripts]
if(pos[f][s].empty()) return -1;
^
match.cpp:31:26: warning: array subscript has type 'char' [-Wchar-subscripts]
int low=0, high=pos[f][s].size()-1, mid, res=-1;
^
match.cpp:31:29: warning: array subscript has type 'char' [-Wchar-subscripts]
int low=0, high=pos[f][s].size()-1, mid, res=-1;
^
match.cpp:34:17: warning: array subscript has type 'char' [-Wchar-subscripts]
if(pos[f][s][mid]<=r){
^
match.cpp:34:20: warning: array subscript has type 'char' [-Wchar-subscripts]
if(pos[f][s][mid]<=r){
^
match.cpp:41:13: warning: array subscript has type 'char' [-Wchar-subscripts]
if(pos[f][s][res]<l) return -1;
^
match.cpp:41:16: warning: array subscript has type 'char' [-Wchar-subscripts]
if(pos[f][s][res]<l) return -1;
^
match.cpp:42:17: warning: array subscript has type 'char' [-Wchar-subscripts]
return pos[f][s][res];
^
match.cpp:42:20: warning: array subscript has type 'char' [-Wchar-subscripts]
return pos[f][s][res];
^
match.cpp: In function 'int find_first(char, char, int, int)':
match.cpp:45:13: warning: array subscript has type 'char' [-Wchar-subscripts]
if(pos[f][s].empty()) return -1;
^
match.cpp:45:16: warning: array subscript has type 'char' [-Wchar-subscripts]
if(pos[f][s].empty()) return -1;
^
match.cpp:46:26: warning: array subscript has type 'char' [-Wchar-subscripts]
int low=0, high=pos[f][s].size()-1, mid, res=-1;
^
match.cpp:46:29: warning: array subscript has type 'char' [-Wchar-subscripts]
int low=0, high=pos[f][s].size()-1, mid, res=-1;
^
match.cpp:49:17: warning: array subscript has type 'char' [-Wchar-subscripts]
if(pos[f][s][mid]>=r){
^
match.cpp:49:20: warning: array subscript has type 'char' [-Wchar-subscripts]
if(pos[f][s][mid]>=r){
^
match.cpp:56:13: warning: array subscript has type 'char' [-Wchar-subscripts]
if(pos[f][s][res]>r) return -1;
^
match.cpp:56:16: warning: array subscript has type 'char' [-Wchar-subscripts]
if(pos[f][s][res]>r) return -1;
^
match.cpp:57:17: warning: array subscript has type 'char' [-Wchar-subscripts]
return pos[f][s][res];
^
match.cpp:57:20: warning: array subscript has type 'char' [-Wchar-subscripts]
return pos[f][s][res];
^
match.cpp: In function 'int main()':
match.cpp:84:25: warning: array subscript has type 'char' [-Wchar-subscripts]
for(char c: s) cnt[c]++;
^
match.cpp:4:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
#define FFOR(i, j, k) for(int i=(j); i<(k); i++)
^
match.cpp:89:5: note: in expansion of macro 'FFOR'
FFOR(i, 1, s.size()) pos[s[i-1]][s[i]].pb(i-1);
^~~~
match.cpp:89:36: warning: array subscript has type 'char' [-Wchar-subscripts]
FFOR(i, 1, s.size()) pos[s[i-1]][s[i]].pb(i-1);
^
match.cpp:89:42: warning: array subscript has type 'char' [-Wchar-subscripts]
FFOR(i, 1, s.size()) pos[s[i-1]][s[i]].pb(i-1);
^