Created
July 29, 2019 00:50
-
-
Save jongha/42a396dbe70354c0935e17bbb55bf092 to your computer and use it in GitHub Desktop.
UVa 11311 - Exclusively Edible
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <vector> | |
#include <list> | |
#include <algorithm> | |
#include <string.h> | |
#include <string> | |
#include <math.h> | |
using namespace std; | |
int main(void) { | |
while(true) { | |
int c; | |
int ret = scanf("%d", &c); | |
if(ret == EOF) break; | |
while(c--) { | |
int m, n, r, c; | |
scanf("%d %d %d %d", &m, &n, &r, &c); | |
if (r ^ c ^ (m - r - 1) ^ (n - c - 1)) printf("Gretel\n"); | |
else printf("Hansel\n"); | |
} | |
} | |
return EXIT_SUCCESS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment