Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
68155 | 季洁 | 寻找第二小的数 | C++ | Wrong Answer | 0 | 0 MS | 256 KB | 320 | 2023-02-02 16:18:20 |
#include<bits/stdc++.h> using namespace std; int n; int main(){ cin>>n; for(int i=1;i<=n;i++){ int a,b[101]={0},c,f=0,ans=0; cin>>a; for(int j=1;j<=a;j++) cin>>c,b[c]=1; for(int j=1;j<=100;j++){ if(b[j]) f++; if(f==2){cout<<j<<endl;break;} } if(f!=2) cout<<"NO"<<endl; } return 0; }