Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
160996 王慕哲 寻找第二小的数 C++ Wrong Answer 1 MS 272 KB 508 2026-09-26 18:16:05

Tests(0/1):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int C; cin>>C; while(C--){ int n; cin>>n; int a[11]; for(int i=0;i<n;i++){ cin>>a[i]; } sort(a,a+n); int main=a[0]; bool f=1; for(int i=0;i<n;i++){ if(a[i]!=main){ cout<<a[i]<<endl; f=0; break; } } if(f)cout<<"N)"<<endl; } return 0; }


Run Info:

------Input------
10 10 9 80 70 60 60 1 9 9 1 1 2 1 1 2 90 99 5 2 2 2 2 2 8 0 -1 -1 1 2 3 4 5 10 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 2 -4 -9 2 -0 0 2 -0 8 7 -0 0 0 -0 0 0 9
------Answer-----
9 NO 99 NO 0 NO -4 NO 8 9
------Your output-----
9 N) 99 N) 0 N) -4 N) 8 9