2 条题解
-
0
``cpp #include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector a(n + 1); for(int i = 1;i <= n;i++){ cin >> a[i]; } int x; cin >> x; bool nofind = true; for(int i = 1;i <= n;i++){ if(x == a[i]){ cout << i; nofind = false; break; } } if(nofind){ cout << -1; } return 0; }
- 1
信息
- ID
- 114
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 6
- 标签
- 递交数
- 156
- 已通过
- 45
- 上传者