Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <algorithm>
- using namespace std;
- int main() {
- int n;
- cin >> n;
- int x;
- cin >> x;
- int niza[n];
- for(int i = 0; i < n; i++) {
- cin >> niza[i];
- }
- sort(niza, niza + n);
- int idx = lower_bound(niza, niza + n, x) - niza;
- cout << idx << endl;
- return 0;
- }
- /*
- 8 14
- 1 3 5 6 7 9 10 12
- **/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement