| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 74223 | 梅煦洋 | 二分查找 | C++ | Runtime Error | 0 | 0 MS | 340 KB | 289 | 2023-05-20 17:32:45 |
#include<bits/stdc++.h> using namespace std; long long a[2190002]={0}; long long ans=0; long long k; long long p,t; int main(){ cin>>k; for(int i=1;i<=k;i++){ cin>>p; if(a[p]==0) a[p]=i; } cin>>t; if(a[t]==0) cout<<"-1"<<endl; else cout<<a[t]<<endl; return 0; }