close

https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=2493

 

#include <bits/stdc++.h>

using namespace std;

int main() {
    int cas, n, m, x, y;

    while (scanf("%d", &cas) && cas) {
        scanf("%d %d", &n, &m);
        for (int i = 0; i<cas; i++) {
            scanf("%d %d", &x, &y);
            if (x == n || y == m)
                printf("divisa\n");
            else if (x>n && y<m)
                printf("SE\n");
            else if (x>n && y>m)
                printf("NE\n");
            else if (x<n && y<m)
                printf("SO\n");
            else if (x<n && y>m)
                printf("NO\n");
        }
    }
    return 0;
}

arrow
arrow
    文章標籤
    Division of Nlogonia UVA11498
    全站熱搜

    楓綺 發表在 痞客邦 留言(0) 人氣()