HDU 3279 Nth Largest Value

http://acm.hdu.edu.cn/showproblem.php?pid=3279

无聊题。。。

View Code
#include <iostream>
#include <algorithm>
using namespace std ;
int main()
{
    int p;
    scanf("%d",&p);
    while(p--)
    {
        int cas;
        scanf("%d",&cas);
        int a[10];
        for(int i=0;i<10;i++)
            scanf("%d",&a[i]);
        sort(a,a+10);
        printf("%d %d\n",cas,a[7]);
    }
    return 0;
} 
原文地址:https://www.cnblogs.com/xiaohongmao/p/2528275.html