Skip to content

Instantly share code, notes, and snippets.

@TheoKlein
Created May 7, 2016 03:39
Show Gist options
  • Select an option

  • Save TheoKlein/c5f1a5831ca28e8c3fdad342b20f94f8 to your computer and use it in GitHub Desktop.

Select an option

Save TheoKlein/c5f1a5831ca28e8c3fdad342b20f94f8 to your computer and use it in GitHub Desktop.
ZeroJudge a130
#include <stdio.h>
int main() {
int num , i , j;
scanf("%d",&num);
for(i = 1 ; i <= num ; ++i){
char url[10][105];
int relation[10][1] , max = 0;
for(j = 0 ; j < 10 ; ++j){
scanf("%s%d",url[j] , relation[j]);
if(*relation[j] > max){
max = *relation[j];
}
}
printf("Case #%d:\n",i);
for(j = 0 ; j < 10 ; ++j){
if(*relation[j] == max)
printf("%s\n",url[j]);
}
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment