提交时间:2023-02-02 14:04:37
运行 ID: 68086
#include <bits/stdc++.h> using namespace std; int small,sesmall,num,c,n; int main(){ cin>>c; while(c--){ small=101; sesmall=101; cin>>n; while(n--){ cin>>num; if(num<small) small=num; if(num>small&&num<sesmall) sesmall=num; } if(sesmall<=101) cout<<sesmall<<endl; else cout<<"NO"<<endl; } return 0; }