← Back to List

2693번: N번째 큰 수 ↗

Solutions

C++14
264 B | 264 chars
#include <iostream>
#include <algorithm>
using namespace std;
int T,ar[11],answer[1100];
int main()
{
	cin>>T;
	for(int w=0; w<T; w++)
	{
		for(int x=0; x<10; x++)cin>>ar[x];
		sort(ar,ar+10);
		answer[w]=ar[7];
	}
	for(int w=0; w<T; w++)cout<<answer[w]<<endl;
	
}