Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define ll long long
- #define _test int _TEST; cin>>_TEST; while(_TEST--)
- #define ff first
- #define pb push_back
- int main()
- {
- ll int n, h, x;
- cin>>n>>h>>x;
- vector<ll int> a(n);
- for(auto &e: a)
- cin>>e;
- ll int ans = 0;
- int tmp = 0;
- for(auto e: a)
- {
- tmp++;
- if(e >= x-h)
- {
- ans = tmp;
- break;
- }
- }
- cout<<ans<<"\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment