#26554: c++野蠻解法


99980001 (207-07張讓宸)

學校 : 臺北市私立延平高級中學
編號 : 128504
來源 : [203.72.178.2]
最後登入時間 :
2024-10-22 10:35:11
a130. 12015 - Google is Feeling Lucky -- UVa12015 | From: [218.35.155.18] | 發表日期 : 2021-08-13 14:12

#include<bits/stdc++.h>

using namespace std;

int main(){

string a="",b="",c="",d="",e="",f="",g="",h="",i="",j="",x;

int t,n=0,na=0,nb=0,nc=0,nd=0,ne=0,nf=0,ng=0,nh=0,ni=0,nj=0;

while(cin>>t){

for(int y=1;y<=t;y++){

cin>>x>>n;

if(n>na){

na=n;

a=x;

nb=0,nc=0,nd=0,ne=0,nf=0,ng=0,nh=0,ni=0,nj=0;

b="",c="",d="",e="",f="",g="",h="",i="",j="";

cin>>x>>n;

if(n>na){

na=n;

a=x;

nb=0,nc=0,nd=0,ne=0,nf=0,ng=0,nh=0,ni=0,nj=0;

b="",c="",d="",e="",f="",g="",h="",i="",j="";

else if(n==na){

nb=n;

b=x;

}

cin>>x>>n;

if(n>na){

na=n;

a=x;

nb=0,nc=0,nd=0,ne=0,nf=0,ng=0,nh=0,ni=0,nj=0;

b="",c="",d="",e="",f="",g="",h="",i="",j="";

else if(n==na){

nc=n;

c=x;

}

cin>>x>>n;

if(n>na){

na=n;

a=x;

nb=0,nc=0,nd=0,ne=0,nf=0,ng=0,nh=0,ni=0,nj=0;

b="",c="",d="",e="",f="",g="",h="",i="",j="";

else if(n==na){

nd=n;

d=x;

}

cin>>x>>n;

if(n>na){

na=n;

a=x;

nb=0,nc=0,nd=0,ne=0,nf=0,ng=0,nh=0,ni=0,nj=0;

b="",c="",d="",e="",f="",g="",h="",i="",j="";

else if(n==na){

ne=n;

e=x;

}

cin>>x>>n;

if(n>na){

na=n;

a=x;

nb=0,nc=0,nd=0,ne=0,nf=0,ng=0,nh=0,ni=0,nj=0;

b="",c="",d="",e="",f="",g="",h="",i="",j="";

else if(n==na){

nf=n;

f=x;

}

 

cin>>x>>n;

if(n>na){

na=n;

a=x;

nb=0,nc=0,nd=0,ne=0,nf=0,ng=0,nh=0,ni=0,nj=0;

b="",c="",d="",e="",f="",g="",h="",i="",j="";

else if(n==na){

ng=n;

g=x;

}

cin>>x>>n;

if(n>na){

na=n;

a=x;

nb=0,nc=0,nd=0,ne=0,nf=0,ng=0,nh=0,ni=0,nj=0;

b="",c="",d="",e="",f="",g="",h="",i="",j="";

else if(n==na){

nh=n;

h=x;

}

cin>>x>>n;

if(n>na){

na=n;

a=x;

nb=0,nc=0,nd=0,ne=0,nf=0,ng=0,nh=0,ni=0,nj=0;

b="",c="",d="",e="",f="",g="",h="",i="",j="";

else if(n==na){

ni=n;

i=x;

}

cin>>x>>n;

if(n>na){

na=n;

a=x;

nb=0,nc=0,nd=0,ne=0,nf=0,ng=0,nh=0,ni=0,nj=0;

b="",c="",d="",e="",f="",g="",h="",i="",j="";

else if(n==na){

nj=n;

j=x;

}

cout<<"Case #"<<y<<":"<<endl;

if(a!="")cout<<a<<endl;

if(b!="")cout<<b<<endl;

if(c!="")cout<<c<<endl;

if(d!="")cout<<d<<endl;

if(e!="")cout<<e<<endl;

if(f!="")cout<<f<<endl;

if(g!="")cout<<g<<endl;

if(h!="")cout<<h<<endl;

if(i!="")cout<<i<<endl;

if(j!="")cout<<j<<endl;

 

n=0,na=0,nb=0,nc=0,nd=0,ne=0,nf=0,ng=0,nh=0,ni=0,nj=0;

a="",b="",c="",d="",e="",f="",g="",h="",i="",j="";

 

 

 

}

}

}

 
ZeroJudge Forum