#include<bits/stdc++.h> using namespace std; int main(){ int n, h, x, a[101]; cin >> n >> h >> x; for(int i = 1; i <= n; i++) cin >> a[i]; for(int i = 1; i <= n; i++){ if(h + a[i] >= x){ cout << i; break; } } return 0; }
#include<bits/stdc++.h> using namespace std; #define int long long signed main() { int n,a,b;cin>>n>>a>>b; for(int i=1;i<=n;i++) { int x;cin>>x; if(x>=b-a) { cout<<i; return 0; } } return 0; }
注册一个 oirush 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。
使用您的 oirush 通用账户