| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 74067 | 安一宸 | 二分查找 | C++ | Wrong Answer | 0 | 3 MS | 300 KB | 274 | 2023-05-20 15:14:39 |
#include<bits/stdc++.h> using namespace std; int n,a[100010],x,t,f; int main(){ cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; } cin>>x; for(int i=1;i<=n;i++){ t++; if(a[i]==x){ f=1; break; } } if(f=1) cout<<t; else cout<<-1; return 0; }