这题主要是使用一下#include<limits.h>,有点忘了,调了些时间啊,需要练习一下了
#include<stdio.h>
#include<limits.h>int main()
{int length, radius, data;int N, m;scanf("%d",&N);while(N--){length = INT_MIN;radius = INT_MAX;data = INT_MIN;scanf("%d", &m);while(m--){int a, b, c;scanf("%d%d%d", &a, &b, &c);if(a>length){length = a;radius = b;data = c;}if(a==length){if(b<radius){length = a;radius = b;data = c;}if(b==radius && c>=data){length = a;radius = b;data = c; }}}printf("%d\n", data);}return 0;
}