Problem floors
User JerryCodebreaker
Submission Time 2024-07-27 20:38:09
Score 0
Max Time N/A
Max Memory N/A

Compile Error

floors.cpp: In function ‘int main()’:
floors.cpp:21:19: error: invalid initialization of reference of type ‘std::set<long long int>&’ from expression of type ‘std::unordered_set<long long int>’
21 | if(smallerThanX(s1,a)!=-1){
| ^~
floors.cpp:3:40: note: in passing argument 1 of ‘long long int smallerThanX(std::set<long long int>&, long long int)’
3 | long long smallerThanX(set<long long> &s, long long x){
| ~~~~~~~~~~~~~~~~^
floors.cpp:22:23: error: invalid initialization of reference of type ‘std::set<long long int>&’ from expression of type ‘std::unordered_set<long long int>’
22 | cout<<smallerThanX(s1,a);
| ^~
floors.cpp:3:40: note: in passing argument 1 of ‘long long int smallerThanX(std::set<long long int>&, long long int)’
3 | long long smallerThanX(set<long long> &s, long long x){
|