Problem arrayfind
User Yuhmama
Submission Time 2026-06-25 15:41:16
Score 0
Max Time N/A
Max Memory N/A

Compile Error

arrayfind.cpp: In function ‘int main()’:
arrayfind.cpp:15:14: error: redeclaration of ‘std::vector<long long int> A’
15 | vector<int> A(Q);
| ^
arrayfind.cpp:8:14: note: ‘std::vector<long long int> A’ previously declared here
8 | vector<int> A(L);
| ^
arrayfind.cpp:17:10: error: ‘B’ was not declared in this scope
17 | cin >> B[i];
| ^
arrayfind.cpp:20:87: error: ‘n’ was not declared in this scope
20 | cout <<"Smaller: "<< lower_bound(A.begin(),A.end(),x)-A.begin() <<", Greater: "<<n-(upper_bound(A.begin(),A.end(),x)-A.begin())<<"\n";
| ^