Skip to content

Instantly share code, notes, and snippets.

@rogerioagjr
Created June 8, 2015 21:34
Show Gist options
  • Save rogerioagjr/0646b533501f6ef09837 to your computer and use it in GitHub Desktop.
Save rogerioagjr/0646b533501f6ef09837 to your computer and use it in GitHub Desktop.
Cobra Coral
// Cobra Coral - F1P2 - OBI 2015
// Rogério Júnior
// Complexidade: O(1)
#include <cstdio>
int main(){
// declaro e leio os números da sequência
int a, b, c, d;
scanf("%d %d %d %d", &a, &b, &c, &d);
// se o primeiro for igual ao último
if(a==d) printf("F\n"); // então é uma coral falsa
// caso contrário, é uma coral verdadeira
else printf("V\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment