Problem binarysearch
User Hihihihihi
Submission Time 2026-06-25 15:00:20
Score 0
Max Time N/A
Max Memory N/A

Compile Error

binarysearch.cpp: In function ‘int main()’:
binarysearch.cpp:12:19: error: assignment of function ‘std::ios_base& std::right(std::ios_base&)’
12 | int left=0;right=n-1;mid;
| ~~~~~^~~~
binarysearch.cpp:12:24: error: ‘mid’ was not declared in this scope
12 | int left=0;right=n-1;mid;
| ^~~
binarysearch.cpp:13:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
13 | while (left<right> {
| ^~~~~
binarysearch.cpp:13:22: error: expected primary-expression before ‘{’ token
13 | while (left<right> {
| ^
binarysearch.cpp:13:21: error: expected ‘)’ before ‘{’ token
13 | while (left<right> {
| ~ ^~
| )
binarysearch.cpp:14:24: error: invalid operands of types ‘std::ios_base& (*)(std::ios_base&)’ and ‘int’ to binary ‘operator/’