// UVa 11498 - Division of Nlogonia #include <iostream> using namespace std; int main() { int k; cin >> k; while (k) { int n, m; cin >> n >> m; for (int i = 0; i < k; i++) { int x, y; cin >> x >> y; if (x == n || y == m) cout << "divisa" << endl; else { if (y > m) cout << 'N'; else cout << 'S'; if (x > n) cout << 'E'; else cout << 'O'; cout << endl; } } cin >> k; } return 0; }
No comments:
Post a Comment