Problem swords
User R9q5P8
Submission Time 2026-10-23 12:31:21
Score 0
Max Time N/A
Max Memory N/A

Compile Error

swords.cpp: In function ‘int main()’:
swords.cpp:24:32: error: ‘a’ was not declared in this scope
24 | auto itr = aidx.lower_bound({a[i], -1});
| ^
swords.cpp:24:41: error: no matching function for call to ‘std::set<std::pair<int, int> >::lower_bound(<brace-enclosed initializer list>)’
24 | auto itr = aidx.lower_bound({a[i], -1});
| ^
In file included from /usr/include/c++/9/set:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:87,
from swords.cpp:1:
/usr/include/c++/9/bits/stl_set.h:829:7: note: candidate: ‘std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::lower_bound(const key_type&) [with _Key = std::pair<int, int>; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >; std::set<_Key, _Compare, _