triples.cpp: In function 'int is_triple(std::vector<int>)':
triples.cpp:10:8: error: no match for 'operator[]' (operand types are 'std::map<std::array<int, 3>, int>' and 'std::vector<int>')
10 | if(mp[g]||(g[0]==g[1]&&g[0]!=g[2]&&g[1]!=g[1]))return 0;
| ^
In file included from /usr/include/c++/11/map:61,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:81,
from triples.cpp:3:
/usr/include/c++/11/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<int, 3>; _Tp = int; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::pair<const std::array<int, 3>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::array<int, 3>]'
492 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/11/bits/stl_map.h:492:34: note: no known conversion for argument 1 from 'std::vector<int>' to 'const key_type&' {aka 'const std::array<int, 3>&'}
492 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/11/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<int, 3>; _Tp = int; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::pair<const std::array<int, 3>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::array<int, 3>]'
512 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/11/bits/stl_map.h:512:29: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::map<std::array<int, 3>, int>::key_type&&' {aka 'std::array<int, 3>&&'}
512 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
triples.cpp:11:5: error: no match for 'operator[]' (operand types are 'std::map<std::array<int, 3>, int>' and 'std::vector<int>')
11 | mp[g]++;
| ^
In file included from /usr/include/c++/11/map:61,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:81,
from triples.cpp:3:
/usr/include/c++/11/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<int, 3>; _Tp = int; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::pair<const std::array<int, 3>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::array<int, 3>]'
492 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/11/bits/stl_map.h:492:34: note: no known conversion for argument 1 from 'std::vector<int>' to 'const key_type&' {aka 'const std::array<int, 3>&'}
492 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/11/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<int, 3>; _Tp = int; _Compare = std::less<std::array<int, 3> >; _Alloc = std::allocator<std::pair<const std::array<int, 3>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::array<int, 3>]'
512 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/11/bits/stl_map.h:512:29: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::map<std::array<int, 3>, int>::key_type&&' {aka 'std::array<int, 3>&&'}
512 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~