| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 68117 | 董承诺 | 寻找第二小的数 | C++ | Wrong Answer | 0 | 0 MS | 252 KB | 468 | 2023-02-02 15:11:05 |
#include <bits/stdc++.h> using namespace std; int a,b,c[20]; int main(){ cin>>a; while(a--){ cin>>b; for(int i=1;i<=b;i++) cin>>c[i]; int d=c[1]; for(int i=1;i<=b;i++){ if(d<=c[i]) d+=0; if(d>c[i]) d=c[i]; } if(d==c[1]){ cout<<"NO"<<endl; return 0; } for(int i=1;i<b;i++) if(c[i]==d) c[i]=0; for(int i=1;i<=b;i++){ int d=c[1]; if(d<=c[i]) d+=0; if(d>c[i]) d=c[i]; } cout<<d<<endl; } return 0; }