Problem arrayfind
User j0ashhh
Submission Time 2026-02-20 12:33:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

arrayfind.cpp: In function ‘int bs(std::vector<long long int>, long long int)’:
arrayfind.cpp:4:14: error: ‘n’ was not declared in this scope
4 | int l=-1, r=n;
| ^
arrayfind.cpp:7:9: error: ‘k’ was not declared in this scope
7 | if(k<a[m]){
| ^
arrayfind.cpp:7:14: error: invalid types ‘long long int[int]’ for array subscript
7 | if(k<a[m]){
| ^
arrayfind.cpp:14:11: error: a function-definition is not allowed here before ‘{’ token
14 | int main(){
| ^
arrayfind.cpp:31:1: error: expected ‘}’ at end of input
31 | }
| ^
arrayfind.cpp:3:39: note: to match this ‘{’
3 | int bs(vector<long long>, long long a){
| ^