Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main () {
- int T;
- while (T--) {
- int n;
- cin >> n;
- int ok1 = 0, ok2 = 0;
- for (int i = 1; i <= n; ++i) {
- int x, y;
- cin >> x >> y;
- if (x >= y) {
- ok1 = 1;
- }
- if (x <= y) {
- ok2 = 1;
- }
- }
- cout << ok1 * ok2 ? "Da\n" : "Nu\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement