Problem swords
User sussygoose
Submission Time 2024-02-24 11:08:56
Score 0
Max Time N/A
Max Memory N/A

Compile Error

swords.cpp: In function ‘int main()’:
swords.cpp:22:5: error: expected ‘}’ before ‘else’
22 | else if (def[a]>=def[b] && att[a]<=att[b])
| ^~~~
swords.cpp:19:42: note: to match this ‘{’
19 | if (def[a]>=def[b] && att[a]>=att[b]){
| ^
swords.cpp:31:4: error: reference to ‘count’ is ambiguous
31 | count=count+1;
| ^~~~~
In file included from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from swords.cpp:1:
/usr/include/c++/9/pstl/glue_algorithm_defs.h:101:1: note: candidates are: ‘template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)’
101 | cou