lang.cpp: In function 'int guess(std::vector<int>)':
lang.cpp:22:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
22 | for(int i = 0; i < s.size(); i++) {
| ~~^~~~~~~~~~
lang.cpp:27:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
27 | for(int i = 0; i < s.size() - 1; i++) {
| ~~^~~~~~~~~~~~~~
lang.cpp:32:25: error: no match for 'operator[]' (operand types are 'std::map<std::array<short unsigned int, 2>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> >' and 'std::array<int, 2>')
32 | for(auto p : ngrams2[ngram]) {
| ^
In file included from /usr/include/c++/10/map:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
from /usr/include/x86_64-linux-gnu/c++/10/bits/extc++.h:32,
from lang.cpp:2:
/usr/include/c++/10/bits/stl_map.h:492:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::array<short unsigned int, 2>; _Tp = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; _Compare = std::less<std::array<short unsigned int, 2> >; _Alloc = std::allocator<std::pair<const std::array<short unsigned int, 2>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> > >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::array<short unsigned int, 2>]'
492 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:492:34: note: no known conversion for argument 1 from 'std::array<int, 2>' to 'const key_type&' {aka 'const std::array<short unsigned int, 2>&'}
492 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_map.h:512:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = std::array<short unsigned int, 2>; _Tp = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; _Compare = std::less<std::array<short unsigned int, 2> >; _Alloc = std::allocator<std::pair<const std::array<short unsigned int, 2>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> > >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::array<short unsigned int, 2>]'
512 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:512:29: note: no known conversion for argument 1 from 'std::array<int, 2>' to 'std::map<std::array<short unsigned int, 2>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> >::key_type&&' {aka 'std::array<short unsigned int, 2>&&'}
512 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
lang.cpp:36:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
36 | for(int i = 0; i < s.size() - 2; i++) {
| ~~^~~~~~~~~~~~~~
lang.cpp:41:25: error: no match for 'operator[]' (operand types are 'std::map<std::array<short unsigned int, 3>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> >' and 'std::array<int, 3>')
41 | for(auto p : ngrams3[ngram]) {
| ^
In file included from /usr/include/c++/10/map:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
from /usr/include/x86_64-linux-gnu/c++/10/bits/extc++.h:32,
from lang.cpp:2:
/usr/include/c++/10/bits/stl_map.h:492:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::array<short unsigned int, 3>; _Tp = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; _Compare = std::less<std::array<short unsigned int, 3> >; _Alloc = std::allocator<std::pair<const std::array<short unsigned int, 3>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> > >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::array<short unsigned int, 3>]'
492 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:492:34: note: no known conversion for argument 1 from 'std::array<int, 3>' to 'const key_type&' {aka 'const std::array<short unsigned int, 3>&'}
492 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_map.h:512:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = std::array<short unsigned int, 3>; _Tp = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; _Compare = std::less<std::array<short unsigned int, 3> >; _Alloc = std::allocator<std::pair<const std::array<short unsigned int, 3>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> > >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::array<short unsigned int, 3>]'
512 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:512:29: note: no known conversion for argument 1 from 'std::array<int, 3>' to 'std::map<std::array<short unsigned int, 3>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> >::key_type&&' {aka 'std::array<short unsigned int, 3>&&'}
512 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
lang.cpp:45:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
45 | for(int i = 0; i < s.size() - 3; i++) {
| ~~^~~~~~~~~~~~~~
lang.cpp:50:25: error: no match for 'operator[]' (operand types are 'std::map<std::array<short unsigned int, 4>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> >' and 'std::array<int, 4>')
50 | for(auto p : ngrams4[ngram]) {
| ^
In file included from /usr/include/c++/10/map:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
from /usr/include/x86_64-linux-gnu/c++/10/bits/extc++.h:32,
from lang.cpp:2:
/usr/include/c++/10/bits/stl_map.h:492:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::array<short unsigned int, 4>; _Tp = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; _Compare = std::less<std::array<short unsigned int, 4> >; _Alloc = std::allocator<std::pair<const std::array<short unsigned int, 4>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> > >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::array<short unsigned int, 4>]'
492 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:492:34: note: no known conversion for argument 1 from 'std::array<int, 4>' to 'const key_type&' {aka 'const std::array<short unsigned int, 4>&'}
492 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_map.h:512:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = std::array<short unsigned int, 4>; _Tp = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; _Compare = std::less<std::array<short unsigned int, 4> >; _Alloc = std::allocator<std::pair<const std::array<short unsigned int, 4>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> > >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::array<short unsigned int, 4>]'
512 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:512:29: note: no known conversion for argument 1 from 'std::array<int, 4>' to 'std::map<std::array<short unsigned int, 4>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> >::key_type&&' {aka 'std::array<short unsigned int, 4>&&'}
512 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
lang.cpp:54:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
54 | for(int i = 0; i < s.size() - 4; i++) {
| ~~^~~~~~~~~~~~~~
lang.cpp:59:25: error: no match for 'operator[]' (operand types are 'std::map<std::array<short unsigned int, 5>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> >' and 'std::array<int, 5>')
59 | for(auto p : ngrams5[ngram]) {
| ^
In file included from /usr/include/c++/10/map:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
from /usr/include/x86_64-linux-gnu/c++/10/bits/extc++.h:32,
from lang.cpp:2:
/usr/include/c++/10/bits/stl_map.h:492:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::array<short unsigned int, 5>; _Tp = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; _Compare = std::less<std::array<short unsigned int, 5> >; _Alloc = std::allocator<std::pair<const std::array<short unsigned int, 5>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> > >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::array<short unsigned int, 5>]'
492 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:492:34: note: no known conversion for argument 1 from 'std::array<int, 5>' to 'const key_type&' {aka 'const std::array<short unsigned int, 5>&'}
492 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_map.h:512:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = std::array<short unsigned int, 5>; _Tp = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; _Compare = std::less<std::array<short unsigned int, 5> >; _Alloc = std::allocator<std::pair<const std::array<short unsigned int, 5>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> > >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::array<short unsigned int, 5>]'
512 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:512:29: note: no known conversion for argument 1 from 'std::array<int, 5>' to 'std::map<std::array<short unsigned int, 5>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> >::key_type&&' {aka 'std::array<short unsigned int, 5>&&'}
512 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
lang.cpp:63:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
63 | for(int i = 0; i < s.size() - 5; i++) {
| ~~^~~~~~~~~~~~~~
lang.cpp:68:25: error: no match for 'operator[]' (operand types are 'std::map<std::array<short unsigned int, 6>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> >' and 'std::array<int, 6>')
68 | for(auto p : ngrams6[ngram]) {
| ^
In file included from /usr/include/c++/10/map:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
from /usr/include/x86_64-linux-gnu/c++/10/bits/extc++.h:32,
from lang.cpp:2:
/usr/include/c++/10/bits/stl_map.h:492:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::array<short unsigned int, 6>; _Tp = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; _Compare = std::less<std::array<short unsigned int, 6> >; _Alloc = std::allocator<std::pair<const std::array<short unsigned int, 6>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> > >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::array<short unsigned int, 6>]'
492 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:492:34: note: no known conversion for argument 1 from 'std::array<int, 6>' to 'const key_type&' {aka 'const std::array<short unsigned int, 6>&'}
492 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_map.h:512:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = std::array<short unsigned int, 6>; _Tp = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; _Compare = std::less<std::array<short unsigned int, 6> >; _Alloc = std::allocator<std::pair<const std::array<short unsigned int, 6>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> > >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::array<short unsigned int, 6>]'
512 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:512:29: note: no known conversion for argument 1 from 'std::array<int, 6>' to 'std::map<std::array<short unsigned int, 6>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> >::key_type&&' {aka 'std::array<short unsigned int, 6>&&'}
512 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
lang.cpp: In function 'void process(int, std::vector<int>)':
lang.cpp:76:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
76 | for(int i = 0; i < s.size(); i++) {
| ~~^~~~~~~~~~
lang.cpp:79:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
79 | for(int i = 0; i < s.size() - 1; i++) {
| ~~^~~~~~~~~~~~~~
lang.cpp:84:12: error: no match for 'operator[]' (operand types are 'std::map<std::array<short unsigned int, 2>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> >' and 'std::array<int, 2>')
84 | ngrams2[ngram][lang]++;
| ^
In file included from /usr/include/c++/10/map:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
from /usr/include/x86_64-linux-gnu/c++/10/bits/extc++.h:32,
from lang.cpp:2:
/usr/include/c++/10/bits/stl_map.h:492:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::array<short unsigned int, 2>; _Tp = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; _Compare = std::less<std::array<short unsigned int, 2> >; _Alloc = std::allocator<std::pair<const std::array<short unsigned int, 2>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> > >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::array<short unsigned int, 2>]'
492 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:492:34: note: no known conversion for argument 1 from 'std::array<int, 2>' to 'const key_type&' {aka 'const std::array<short unsigned int, 2>&'}
492 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_map.h:512:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = std::array<short unsigned int, 2>; _Tp = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; _Compare = std::less<std::array<short unsigned int, 2> >; _Alloc = std::allocator<std::pair<const std::array<short unsigned int, 2>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> > >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int>; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::array<short unsigned int, 2>]'
512 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:512:29: note: no known conversion for argument 1 from 'std::array<int, 2>' to 'std::map<std::array<short unsigned int, 2>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> >::key_type&&' {aka 'std::array<short unsigned int, 2>&&'}
512 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
lang.cpp:86:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
86 | for(int i = 0; i < s.size() - 2; i++) {
| ~~^~~~~~~~~~~~~~
lang.cpp:91:12: error: no match for 'operator[]' (operand types are 'std::map<std::array<short unsigned int, 3>, __gnu_pbds::gp_hash_table<short unsigned int, short unsigned int> >' and 'std::array<int, 3>')
91 | ngrams3[ngram][lang]++;
| ^
In file included from /usr/include/c++/10/map:61,