Problem arrayfind
User Yuhmama
Submission Time 2026-06-25 15:40:17
Score 0
Max Time N/A
Max Memory N/A

Compile Error

arrayfind.cpp: In function ‘int main()’:
arrayfind.cpp:20:39: error: ‘vec’ was not declared in this scope
20 | cout <<"Smaller: "<< lower_bound(vec.begin(),vec.end(),x)-vec.begin() <<", Greater: "<<n-(upper_bound(vec.begin(),vec.end(),x)-vec.begin())<<"\n";
| ^~~
arrayfind.cpp:20:93: error: ‘n’ was not declared in this scope
20 | cout <<"Smaller: "<< lower_bound(vec.begin(),vec.end(),x)-vec.begin() <<", Greater: "<<n-(upper_bound(vec.begin(),vec.end(),x)-vec.begin())<<"\n";
| ^