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