#include <stdio.h> int main () { int k,x,y,m,n; while (scanf("%d",&k)==1) { if (k==0) break; scanf("%d%d",&x,&y); while (k--) { scanf("%d%d",&m,&n); m=m-x; n=n-y; if (m==0 ||n==0) printf("divisa\n"); else if (m>0&&n>0) printf("NE\n"); else if (m>0&&n<0) printf("SE\n"); else if (m<0&&n>0) printf("NO\n"); else if (m<0&&n<0) printf("SO\n"); } } return 0; }
Sunday, April 24, 2016
UVA 11498: Division of Nlogonia -Solution
Unknown
Studying at Shahjalal University of Science and Technology, Sylhet.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment