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
/** | |
* Author : Md.Mehadi Hasan Menon. | |
* Problem : 11498 - Divison of Nlogonia. | |
* Status : Accepted. | |
* Date : 08.11.2014. | |
**/ | |
#include <stdio.h> | |
int main() | |
{ | |
int tc, m, n, x, y, i; | |
while(scanf("%d", &tc) == 1) | |
{ | |
if(tc == 0) break; | |
scanf("%d %d", &m, &n); | |
for(i = 0; i < tc; i++) | |
{ | |
scanf("%d %d", &x, &y); | |
if(x > m && y > n) | |
printf("NE\n"); | |
else if(x < m && y > n) | |
printf("NO\n"); | |
else if(x < m && y < n) | |
printf("SO\n"); | |
else if(x > m && y < n) | |
printf("SE\n"); | |
else | |
printf("divisa\n"); | |
} | |
} | |
return 0; | |
} |
Comments
Post a Comment