Thursday, March 3, 2016

UVA 12015

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<iomanip>

using namespace std;

int main()
{
 int a[10],n,i,j,t,k;
 int d=1;
 j=0;
 char bb[10][100];
 
 cin>>t;
 
 while(t--)
 {
  for(i=0; i<10; i++)
  {
   cin>>bb[i];
   cin>>a[i];
   if(a[i]>j){
    j=a[i];
   }
  }
  
  cout<<"Case #"<<d<<":\n";
  
  for(i=0; i<10; i++)
  {
   if(a[i]==j){
    cout<<bb[i]<<endl;
   }
  }
  
  
  d++;
  j=0;
 }
 
 
}

No comments:

Post a Comment

Thank you for commenting. Please wait for response :)