倒数第二
作者:互联网
code
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
ios::sync_with_stdio(false);
int C;
vector<int> vec;
while(cin>>C){
//TODO multiple input
while(C--){
int cnt;
cin>>cnt;
while(cnt--){
int num;
cin>>num;
vec.push_back(num);
}
sort(vec.begin(),vec.end());
cout<<vec[1]<<'\n';
}
}
return 0;
}
question
标签:cnt,倒数,int,第二,cin,num,vec,include 来源: https://www.cnblogs.com/jeseesmith/p/15867248.html