Problem swords
User JamesPearman
Submission Time 2024-02-21 21:18:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

swords.cpp: In function ‘int main()’:
swords.cpp:23:14: error: expected primary-expression before ‘)’ token
23 | for(auto i:)
| ^
swords.cpp:25:3: error: ‘neg’ was not declared in this scope
25 | neg.first=-1;neg.second=-1;
| ^~~
swords.cpp:34:22: error: no match for ‘operator=’ (operand types are ‘std::pair<long long int, long long int>’ and ‘int’)
34 | a[i].second=-1;
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from swords.cpp:1:
/usr/include/c++/9/bits/stl_pair.h:378:7: note: candidate: ‘std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(typename std::conditional<std::__and_<std::is_copy_assignable<_T1>, std