Kortų žaidimas

Taškai: 0

Compile: FAIL

In file included from /usr/include/c++/11/vector:67, from /usr/include/c++/11/queue:61, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:86, from kortu_zaidimas.cpp:1: /usr/include/c++/11/bits/stl_vector.h: In instantiation of ‘struct std::_Vector_base<int, int>’: /usr/include/c++/11/bits/stl_vector.h:389:11: required from ‘class std::vector<int, int>’ kortu_zaidimas.cpp:7:22: required from here /usr/include/c++/11/bits/stl_vector.h:87:28: error: ‘int’ is not a class, struct, or union type 87 | rebind<_Tp>::other _Tp_alloc_type; | ^~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_vector.h:89:9: error: ‘int’ is not a class, struct, or union type 89 | pointer; | ^~~~~~~ /usr/include/c++/11/bits/stl_vector.h: In instantiation of ‘class std::vector<int, int>’: kortu_zaidimas.cpp:7:22: required from here /usr/include/c++/11/bits/stl_vector.h:404:64: error: ‘int’ is not a class, struct, or union type 404 | static_assert(is_same<typename _Alloc::value_type, _Tp>::value, | ^~~~~ /usr/include/c++/11/bits/stl_vector.h:474:20: error: ‘_M_allocate’ has not been declared in ‘std::vector<int, int>::_Base’ 474 | using _Base::_M_allocate; | ^~~~~~~~~~~ /usr/include/c++/11/bits/stl_vector.h:475:20: error: ‘_M_deallocate’ has not been declared in ‘std::vector<int, int>::_Base’ 475 | using _Base::_M_deallocate; | ^~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_vector.h:477:20: error: ‘_M_get_Tp_allocator’ has not been declared in ‘std::vector<int, int>::_Base’ 477 | using _Base::_M_get_Tp_allocator; | ^~~~~~~~~~~~~~~~~~~ kortu_zaidimas.cpp: In function ‘int main()’: kortu_zaidimas.cpp:15:16: error: no match for ‘operator[]’ (operand types are ‘std::vector<int, int>’ and ‘int’) 15 | ans[turn] += arr[R]; | ^ kortu_zaidimas.cpp:19:16: error: no match for ‘operator[]’ (operand types are ‘std::vector<int, int>’ and ‘int’) 19 | ans[turn] += arr[L]; | ^ kortu_zaidimas.cpp:25:12: error: no match for ‘operator[]’ (operand types are ‘std::vector<int, int>’ and ‘int’) 25 | cout << ans[0] << " " << ans[1] << "\n"; | ^ kortu_zaidimas.cpp:25:29: error: no match for ‘operator[]’ (operand types are ‘std::vector<int, int>’ and ‘int’) 25 | cout << ans[0] << " " << ans[1] << "\n"; | ^ In file included from /usr/include/c++/11/vector:67, from /usr/include/c++/11/queue:61, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:86, from kortu_zaidimas.cpp:1: /usr/include/c++/11/bits/stl_vector.h: In instantiation of ‘std::vector<_Tp, _Alloc>::~vector() [with _Tp = int; _Alloc = int]’: kortu_zaidimas.cpp:7:33: required from here /usr/include/c++/11/bits/stl_vector.h:680:37: error: ‘struct std::_Vector_base<int, int>::_Vector_impl’ has no member named ‘_M_start’ 680 | std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, | ~~~~~~~~~~~~~~^~~~~~~~ /usr/include/c++/11/bits/stl_vector.h:680:61: error: ‘struct std::_Vector_base<int, int>::_Vector_impl’ has no member named ‘_M_finish’ 680 | std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, | ~~~~~~~~~~~~~~^~~~~~~~~ /usr/include/c++/11/bits/stl_vector.h:681:42: error: ‘_M_get_Tp_allocator’ was not declared in this scope; did you mean ‘get_allocator’? 681 | _M_get_Tp_allocator()); | ~~~~~~~~~~~~~~~~~~~^~ | get_allocator /usr/include/c++/11/bits/stl_vector.h: In instantiation of ‘std::_Vector_base<_Tp, _Alloc>::_Vector_base(const allocator_type&) [with _Tp = int; _Alloc = int; std::_Vector_base<_Tp, _Alloc>::allocator_type = int]’: /usr/include/c++/11/bits/stl_vector.h:627:18: required from ‘std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = int; _Alloc = int; std::vector<_Tp, _Alloc>::allocator_type = int]’ kortu_zaidimas.cpp:7:33: required from here /usr/include/c++/11/bits/stl_vector.h:294:9: error: no matching function for call to ‘std::_Vector_base<int, int>::_Vector_impl::_Vector_impl(const allocator_type&)’ 294 | : _M_impl(__a) { } | ^~~~~~~~~~~~ /usr/include/c++/11/bits/stl_vector.h:143:9: note: candidate: ‘std::_Vector_base<_Tp, _Alloc>::_Vector_impl::_Vector_impl(std::_Vector_base<_Tp, _Alloc>::_Vector_impl&&) [with _Tp = int; _Alloc = int]’ 143 | _Vector_impl(_Vector_impl&& __x) noexcept | ^~~~~~~~~~~~ /usr/include/c++/11/bits/stl_vector.h:143:37: note: no known conversion for argument 1 from ‘const allocator_type’ {aka ‘const int’} to ‘std::_Vector_base<int, int>::_Vector_impl&&’ 143 | _Vector_impl(_Vector_impl&& __x) noexcept | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/11/bits/stl_vector.h:131:9: note: candidate: ‘std::_Vector_base<_Tp, _Alloc>::_Vector_impl::_Vector_impl() [with _Tp = int; _Alloc = int]’ 131 | _Vector_impl() _GLIBCXX_NOEXCEPT_IF( | ^~~~~~~~~~~~ /usr/include/c++/11/bits/stl_vector.h:131:9: note: candidate expects 0 arguments, 1 provided /usr/include/c++/11/bits/stl_vector.h: In instantiation of ‘std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = int; _Alloc = int]’: /usr/include/c++/11/bits/stl_vector.h:627:18: required from ‘std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = int; _Alloc = int; std::vector<_Tp, _Alloc>::allocator_type = int]’ kortu_zaidimas.cpp:7:33: required from here /usr/include/c++/11/bits/stl_vector.h:335:31: error: ‘struct std::_Vector_base<int, int>::_Vector_impl’ has no member named ‘_M_start’ 335 | _M_deallocate(_M_impl._M_start, | ~~~~~~~~^~~~~~~~ /usr/include/c++/11/bits/stl_vector.h:336:31: error: ‘struct std::_Vector_base<int, int>::_Vector_impl’ has no member named ‘_M_end_of_storage’ 336 | _M_impl._M_end_of_storage - _M_impl._M_start); | ~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_vector.h:336:59: error: ‘struct std::_Vector_base<int, int>::_Vector_impl’ has no member named ‘_M_start’ 336 | _M_impl._M_end_of_storage - _M_impl._M_start); | ~~~~~~~~^~~~~~~~ /usr/include/c++/11/bits/stl_vector.h: In instantiation of ‘void std::vector<_Tp, _Alloc>::_M_range_initialize(_ForwardIterator, _ForwardIterator, std::forward_iterator_tag) [with _ForwardIterator = const int*; _Tp = int; _Alloc = int]’: /usr/include/c++/11/bits/stl_vector.h:629:21: required from ‘std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = int; _Alloc = int; std::vector<_Tp, _Alloc>::allocator_type = int]’ kortu_zaidimas.cpp:7:33: required from here /usr/include/c++/11/bits/stl_vector.h:1581:25: error: ‘struct std::_Vector_base<int, int>::_Vector_impl’ has no member named ‘_M_start’ 1581 | this->_M_impl._M_start | ~~~~~~~~~~~~~~^~~~~~~~ /usr/include/c++/11/bits/stl_vector.h:1582:21: error: ‘class std::vector<int, int>’ has no member named ‘_M_allocate’; did you mean ‘get_allocator’? 1582 | = this->_M_allocate(_S_check_init_len(__n, _M_get_Tp_allocator())); | ~~~~~~^~~~~~~~~~~ | get_allocator /usr/include/c++/11/bits/stl_vector.h:1582:75: error: ‘_M_get_Tp_allocator’ was not declared in this scope; did you mean ‘get_allocator’? 1582 | = this->_M_allocate(_S_check_init_len(__n, _M_get_Tp_allocator())); | ~~~~~~~~~~~~~~~~~~~^~ | get_allocator /usr/include/c++/11/bits/stl_vector.h:1583:25: error: ‘struct std::_Vector_base<int, int>::_Vector_impl’ has no member named ‘_M_end_of_storage’ 1583 | this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_vector.h:1583:59: error: ‘struct std::_Vector_base<int, int>::_Vector_impl’ has no member named ‘_M_start’ 1583 | this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; | ~~~~~~~~~~~~~~^~~~~~~~ /usr/include/c++/11/bits/stl_vector.h:1584:25: error: ‘struct std::_Vector_base<int, int>::_Vector_impl’ has no member named ‘_M_finish’ 1584 | this->_M_impl._M_finish = | ~~~~~~~~~~~~~~^~~~~~~~~ /usr/include/c++/11/bits/stl_vector.h:1586:55: error: ‘struct std::_Vector_base<int, int>::_Vector_impl’ has no member named ‘_M_start’ 1586 | this->_M_impl._M_start, | ~~~~~~~~~~~~~~^~~~~~~~

nr.resulttimemessage