Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
37306 | IKUN(ZHC) | 查找特定的值 | C++ | Accepted | 0 MS | 248 KB | 263 | 2024-01-20 09:48:19 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,m; cin>>n; int num[n]; for(int i=0;i<n;i++){ cin>>num[i]; } cin>>m; for(int i=0;i<m;i++){ if(num[i]==m){ cout<<m-1; return 0; } } cout<<"-1"; return 0; }