Skip to content

Instantly share code, notes, and snippets.

@rogerioagjr
Created July 6, 2015 08:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rogerioagjr/8e9d83eb8d712101d07b to your computer and use it in GitHub Desktop.
Save rogerioagjr/8e9d83eb8d712101d07b to your computer and use it in GitHub Desktop.
Campeonato - Roger Benet
#include <cstdio>
int main(){
int cv,ce,cs,fv,fe,fs,pc,pf;
scanf("%d %d %d %d %d %d", &cv, &ce, &cs, &fv, &fe, &fs);
pc = cv * 3 + ce;
pf = fv * 3 + fe;
if(pc > pf)printf("C\n");
else if(pc < pf)printf("F\n");
else {
if(cs > fs)printf("C\n");
else if(cs < fs)printf("F\n");
else printf("=\n");
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment