3 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1
Second First Same
#include<iostream> #include<string> #include<stdio.h> using namespace std; int main() { int n,ls[6],j; cin>>n; while(n--) { for(int i=0;i<6;i++) cin>>ls[i]; for( j=0;j<3;j++) { if(ls[j]>ls[j+3]) {cout<<"First"<<endl;break;} else if(ls[j]==ls[j+3]) { continue; } else {cout<<"Second"<<endl;break;} } if(j==3) cout<<"Same"<<endl; } return 0; }
杭电 HDU ACM 1976 Software Version
原文地址:http://blog.csdn.net/lsgqjh/article/details/45095655