Problem | floors |
---|---|
User | PlayVoltz |
Submission Time | 2023-09-03 17:43:06 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
floors.cpp: In function ‘int main()’:
floors.cpp:12:8: error: no match for ‘operator[]’ (operand types are ‘std::set<int>’ and ‘int’)
12 | if (s[0]>a){
| ^
floors.cpp:13:11: error: no match for ‘operator[]’ (operand types are ‘std::set<int>’ and ‘std::set<int>::size_type’ {aka ‘long unsigned int’})
13 | cout<<s[s.size()-1]<<"\n";
| ^
floors.cpp:14:13: error: no match for ‘operator[]’ (operand types are ‘std::set<int>’ and ‘std::set<int>::size_type’ {aka ‘long unsigned int’})
14 | s.erase(s[s.size()-1]);
| ^
floors.cpp:17:50: error: no match for ‘operator-’ (operand types are ‘std::_Rb_tree_const_iterator<int>’ and ‘int’)
17 | int num = *(upper_bound(s.begin(), s.end(), a)-1)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
| | |
|