题意:
3个不同的数比较,第一个最小输出First,第二个最小输出Second,第三个最小输出Third。
#include <stdio.h>
#include <algorithm>
using namespace std;
int p[5];
int
main() {
int t, a, b, c;
scanf("%d", &t);
while( t-- ) {
scanf("%d %d %d", &a, &b, &c);
p[0] = a, p[1] = b, p[2] = c;
sort(p, p + 3);
if( p[0] == a ) {
printf("First\n");
}
else if( p[0] == b ) {
printf("Second\n");
}
else if( p[0] == c ) {
printf("Third\n");
}
}
return 0;
}