| Problem | binarysearch |
|---|---|
| User | jaydenlol |
| Submission Time | 2026-06-25 14:48:54 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
binarysearch.cpp: In function ‘int main()’:
binarysearch.cpp:16:7: error: expected unqualified-id before ‘=’ token
16 | int = ans = -1;
| ^
binarysearch.cpp:19:8: error: ‘arr’ was not declared in this scope
19 | if (arr[mid] > k) {
| ^~~
binarysearch.cpp:20:5: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
20 | ans = mid;
| ^~~
| abs
binarysearch.cpp:21:14: error: expected ‘;’ before ‘}’ token
21 | r = mid-1
| ^
| ;
22 | }
| ~
binarysearch.cpp:24:13: error: expected ‘;’ before ‘}’ token
24 | l = mid+1
| ^
| ;
25 | }
| ~
binarysearch.cpp:27:10: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
27 | cout << ans << "\n"
| ^~~
| abs
bi