passes.cpp: In function 'int main()':
passes.cpp:53:13: warning: array subscript has type 'char' [-Wchar-subscripts]
53 | if (!used[c]) {
| ^
passes.cpp:57:8: warning: array subscript has type 'char' [-Wchar-subscripts]
57 | used[c] = true;
| ^
passes.cpp:68:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
68 | for (int i = 0; i < p.size(); i++) {
| ~~^~~~~~~~~~
passes.cpp:69:13: warning: array subscript has type 'char' [-Wchar-subscripts]
69 | ind[p[i]] = i;
| ^
passes.cpp:72:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
72 | for (int i = 0; i < s.size(); i++) {
| ~~^~~~~~~~~~
passes.cpp:75:18: warning: array subscript has type 'char' [-Wchar-subscripts]
75 | if (ind[s[j]] > ind[s[i]]) {
| ^
passes.cpp:75:30: warning: array subscript has type 'char' [-Wchar-subscripts]
75 | if (ind[s[j]] > ind[s[i]]) {
| ^
passes.cpp:82:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
82 | for (int j = i + 1; j < s.size(); j++) {
| ~~^~~~~~~~~~
passes.cpp:83:18: warning: array subscript has type 'char' [-Wchar-subscripts]
83 | if (ind[s[j]] > ind[s[i]]) {
| ^
passes.cpp:83:30: warning: array subscript has type 'char' [-Wchar-subscripts]
83 | if (ind[s[j]] > ind[s[i]]) {
| ^
passes.cpp:98:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
98 | for (int i = 0; i < p.size(); i++) {
| ~~^~~~~~~~~~
passes.cpp:99:12: warning: array subscript has type 'char' [-Wchar-subscripts]
99 | ind[p[i]] = i;
| ^
passes.cpp:107:19: warning: array subscript has type 'char' [-Wchar-subscripts]
107 | if (ind[s[j]] == i) {
| ^
passes.cpp:110:37: warning: array subscript has type 'char' [-Wchar-subscripts]
110 | else if (msk & (1 << (ind[s[j]]))) {
| ^
passes.cpp:118:19: warning: array subscript has type 'char' [-Wchar-subscripts]
118 | if (ind[s[j]] == i) {
| ^
passes.cpp:121:37: warning: array subscript has type 'char' [-Wchar-subscripts]
121 | else if (msk & (1 << (ind[s[j]]))) {
| ^
passes.cpp:124:19: warning: array subscript has type 'char' [-Wchar-subscripts]
124 | if (ind[s[j]] == i) res += min(tmp, full - cur);
| ^