Problem zooqueue
User innerspace777
Submission Time 2024-06-11 12:47:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

zooqueue.cpp: In function ‘int32_t main()’:
zooqueue.cpp:21:25: error: cannot convert ‘std::set<int>::iterator’ {aka ‘std::_Rb_tree_const_iterator<int>’} to ‘int’ in initialization
21 | int it = s.upper_bound(a[i]);
| ~~~~~~~~~~~~~^~~~~~
| |
| std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}
zooqueue.cpp:22:10: error: no match for ‘operator==’ (operand types are ‘int’ and ‘std::set<int>::iterator’ {aka ‘std::_Rb_tree_const_iterator<int>’})
22 | if (it == s.end()) {
| ~~ ^~ ~~~~~~~
| | |
| int std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from zooqueue.cpp:1:
/usr/include/c++/9/bits/rege