fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. int arr[] = {1, 1, 2, 3, 3, 4, 6, 8, 10, 10, 11, 15};
  6. vector<int> v = {1, 1, 2, 3, 3, 4, 6, 8, 10, 10, 11, 15};
  7. cout << lower_bound(v.begin()+6, v.end(), 3)-v.begin() << endl;
  8. return 0;
  9. }
Success #stdin #stdout 0s 5324KB
stdin
Standard input is empty
stdout
6