password.cpp: In function 'void dfs(char, int)':
password.cpp:11:5: warning: array subscript has type 'char' [-Wchar-subscripts]
11 | us[c][i] = 1;
| ^
password.cpp:12:17: warning: array subscript has type 'char' [-Wchar-subscripts]
12 | for(auto to: g[c][i]){
| ^
password.cpp:13:13: warning: array subscript has type 'char' [-Wchar-subscripts]
13 | if(!us[to.first][to.second])
| ~~~^~~~~
password.cpp: In function 'std::string guess(int, int)':
password.cpp:25:7: warning: array subscript has type 'char' [-Wchar-subscripts]
25 | cnt[c] = query(ans);
| ^
password.cpp:29:23: warning: array subscript has type 'char' [-Wchar-subscripts]
29 | for(int i=1; i<=cnt[c]; i++){
| ^
password.cpp:31:16: warning: array subscript has type 'char' [-Wchar-subscripts]
31 | if(i != cnt[c]) g[c][i].push_back({c, i+1});
| ^
password.cpp:31:22: warning: array subscript has type 'char' [-Wchar-subscripts]
31 | if(i != cnt[c]) g[c][i].push_back({c, i+1});
| ^
password.cpp:36:24: warning: array subscript has type 'char' [-Wchar-subscripts]
36 | for(int l=1, r=cnt[d]; l<=r;){
| ^
password.cpp:37:17: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
37 | int mid = l+r>>1;
| ~^~
password.cpp:38:23: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
38 | while(t.size()-i > mid) t.pop_back();
| ~~~~~~~~~~~^~~~~
password.cpp:39:23: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
39 | while(t.size()-i < mid) t += d;
| ~~~~~~~~~~~^~~~~
password.cpp:47:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
47 | if(query(t) != t.size()) l = mid + 1;
| ~~~~~~~~~^~~~~~~~~~~
password.cpp:50:16: warning: array subscript has type 'char' [-Wchar-subscripts]
50 | if(last) g[c][i].push_back({d, last});
| ^
password.cpp:55:10: warning: array subscript has type 'char' [-Wchar-subscripts]
55 | if(cnt[c] && !us[c][1]) dfs(c, 1);
| ^
password.cpp:55:20: warning: array subscript has type 'char' [-Wchar-subscripts]
55 | if(cnt[c] && !us[c][1]) dfs(c, 1);
| ^