| Problem | binarysearch |
|---|---|
| User | H3lloWorld |
| Submission Time | 2026-06-25 13:48:20 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
binarysearch.cpp: In function ‘int main()’:
binarysearch.cpp:6:17: error: ‘n’ was not declared in this scope
6 | int l = 0, r = n-1, ans = -1;
| ^
binarysearch.cpp:9:5: error: ‘arr’ was not declared in this scope
9 | if(arr[mid] >= x){
| ^~~
binarysearch.cpp:9:17: error: ‘x’ was not declared in this scope
9 | if(arr[mid] >= x){
| ^
binarysearch.cpp:10:9: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
10 | ans = mid;
| ^~~
| abs
binarysearch.cpp:17:9: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
17 | cout << ans << "\n";
| ^~~
| abs