Problem binarysearch
User jaydenlol
Submission Time 2026-06-25 14:43:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

cc1plus: error: ‘::main’ must return ‘int’
binarysearch.cpp: In function ‘int main()’:
binarysearch.cpp:16:3: error: expected ‘,’ or ‘;’ before ‘while’
16 | while (l <= r) {
| ^~~~~
binarysearch.cpp:26:21: error: expected ‘;’ before ‘}’ token
26 | cout << ans << "\n"
| ^
| ;
27 | }
| ~
binarysearch.cpp:29:1: error: expected ‘}’ at end of input
29 | }
| ^
binarysearch.cpp:5:12: note: to match this ‘{’
5 | int main() {
| ^