标签:
2 2 2000 30 123456789 2000 20 987654321 4 3000 50 872198442 3000 45 752498124 2000 60 765128742 3000 45 652278122
987654321 752498124
代码:
#include<iostream> #include<stdio.h> using namespace std; int main() { int t; scanf("%d",&t); while(t--) { int a,b,c,a1,b1,c1,m,i; scanf("%d",&m); scanf("%d%d%d",&a,&b,&c); for(i = 1;i < m;i++) { scanf("%d%d%d",&a1,&b1,&c1); if(a<a1||(a1==a&&b1<b)||(a1==a&&b1==b&&c<c1)) { a = a1; b = b1; c = c1; } }printf("%d\n",c); } return 0; }
标签:
原文地址:http://blog.csdn.net/u012701023/article/details/46042205