| Problem | binarysearch |
|---|---|
| User | neoaix |
| Submission Time | 2026-06-25 14:39:00 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
binarysearch.cpp: In function ‘int main()’:
binarysearch.cpp:4:16: error: ‘n’ was not declared in this scope
4 | int l=0, r=n-1 , ans=-1;
| ^
binarysearch.cpp:7:12: error: ‘arr’ was not declared in this scope
7 | if(arr[mid]>= x){
| ^~~
binarysearch.cpp:7:23: error: ‘x’ was not declared in this scope
7 | if(arr[mid]>= x){
| ^
binarysearch.cpp:8:13: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
8 | ans=mid;
| ^~~
| abs
binarysearch.cpp:14:13: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
14 | cout << ans << "\n";
| ^~~
| abs