倒数第二

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

que

上一篇:QTcpServer之(The bound address is already in use)问题


下一篇:C++ vector类的用法整理