Run ID:80845

提交时间:2024-07-11 16:36:08

# include<iostream> using namespace std; int a[2001]; int main(){ int k,n; int first=0,end=0; cin >>n; for(int i=1;i<=n;i++){ if(a[i]==k){ if(first==0){ first=i; } end=i; } } if (first==0){ cout <<-1; }else{ cout <<first<<" "<<endl; } return 0; }