1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
int () { int Case; scanf("%d", &Case); while (Case--) { int n, diff = 0, top, bottom; scanf("%d", &n); while (n--) { scanf("%d%d", &top, &bottom); if (diff != -1) { if (!diff) diff = top - bottom; else if (diff != top - bottom) diff = -1; } }
puts(diff == -1 ? "no" : "yes"); if (Case) putchar('n'); } return 0; }
|
近期评论