Problem bacteria
User yuhong
Submission Time 2024-11-24 16:04:50
Score 0
Max Time N/A
Max Memory N/A

Compile Error

bacteria.cpp: In function ‘void solve()’:
bacteria.cpp:66:20: error: cannot convert ‘std::_Rb_tree_const_iterator<long long int>’ to ‘long long int’
66 | if(range_sum(prev(it),prev(it)) == 0){st.erase(*prev(it));}
| ~~~~^~~~
| |
| std::_Rb_tree_const_iterator<long long int>
bacteria.cpp:42:19: note: initializing argument 1 of ‘long long int range_sum(long long int, long long int)’
42 | int range_sum(int x, int y) { //inclusive
| ^