triples.cpp:7:1: error: expected initializer before 'int'
7 | int is_triple(vector<int>g){
| ^~~
triples.cpp: In function 'long long int count_triples(std::vector<int>)':
triples.cpp:16:5: error: 'v' was not declared in this scope
16 | v=hsh;
| ^
triples.cpp:25:43: error: no match for 'operator=' (operand types are 'std::vector<int>' and '<brace-enclosed initializer list>')
25 | b={v[g[0]],v[g[1]],v[g[2]]};
| ^
In file included from /usr/include/c++/11/vector:72,
from /usr/include/c++/11/functional:62,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from triples.cpp:3:
/usr/include/c++/11/bits/vector.tcc:198:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]'
198 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/vector.tcc:199:42: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::vector<int>&'
199 | operator=(const vector<_Tp, _Alloc>& __x)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/11/vector:67,
from /usr/include/c++/11/functional:62,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from triples.cpp:3:
/usr/include/c++/11/bits/stl_vector.h:709:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]'
709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ^~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:709:26: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<int>&&'
709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ~~~~~~~~~^~~
/usr/include/c++/11/bits/stl_vector.h:730:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]'
730 | operator=(initializer_list<value_type> __l)
| ^~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:730:46: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::initializer_list<int>'
730 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
triples.cpp:28:23: error: invalid cast from type 'std::vector<int>' to type 'int'
28 | ans+= (int)a==b;
| ^~~~~~