Problem swords
User senkyte
Submission Time 2024-02-22 10:10:42
Score 0
Max Time N/A
Max Memory N/A

Compile Error

swords.cpp: In function ‘int main()’:
swords.cpp:21:15: error: invalid cast from type ‘__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type’ {aka ‘std::__cxx11::basic_string<char>’} to type ‘int’
21 | if(int(v[0]) < int(atk[j]) and int(v[1]) < int(defence[j])){
| ^
swords.cpp:21:43: error: invalid cast from type ‘__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type’ {aka ‘std::__cxx11::basic_string<char>’} to type ‘int’
21 | if(int(v[0]) < int(atk[j]) and int(v[1]) < int(defence[j])){
| ^
swords.cpp:25:23: error: no matching function for call to ‘std::vector<int>::push_back(__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::_