ho_t2.cpp: In function 'int main()':
ho_t2.cpp:18:16: warning: array subscript has type 'char' [-Wchar-subscripts]
18 | occ[v[i]].push_back(i);
| ~~~^
ho_t2.cpp:19:24: warning: array subscript has type 'char' [-Wchar-subscripts]
19 | tr[i] = occ[v[i]].size() - 1;
| ~~~^
ho_t2.cpp:26:19: warning: array subscript has type 'char' [-Wchar-subscripts]
26 | nxt[i][v[i]] = i;
| ~~~^
ho_t2.cpp:31:38: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
31 | if(pos == n || occ[0].size() < tr[pos] + k)continue;
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~
ho_t2.cpp:34:38: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
34 | if(id1 == n || occ[1].size() < tr[id1] + k)continue;
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~
ho_t2.cpp:37:38: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
37 | if(id2 == n || occ[2].size() < tr[id2] + k)continue;
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~