#18224: TLE


rexwu1104@gmail.com (黑雪公主 Black Lotus)

學校 : 新北市私立南山高級中學
編號 : 93041
來源 : [211.23.154.252]
最後登入時間 :
2024-05-12 13:41:56
a130. 12015 - Google is Feeling Lucky -- UVa12015 | From: [118.166.57.161] | 發表日期 : 2019-06-28 13:23

#import <iostream>
inline int redn() {
int ret=0,f=1;char ch=getchar_unlocked();
if(ch == EOF)return-1;
while(ch<'0'||ch>'9'){if(ch=='-') f=-f;ch=getchar_unlocked();}
while(ch>='0'&&ch<='9') ret=ret*10+ch-'0',ch=getchar_unlocked();
return ret*f;
}
int main()
{
int a;
while((a=redn())!=-1){
for(int m=1;m<=a;m++){
std::cout << "Case #" << m << ":\n";
std::string b[10]; int c[10], top=0;
for(int i=0;i<10;i++){
std::cin >> b[i] >> c[i];
}
for(int i=0;i<10;i++)if(top<c[i]) top=c[i];
for(int i=0;i<10;i++)if(c[i]==top) std::cout << b[i]<<"\n";
}
}
}
 
ZeroJudge Forum