QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#465458#6666. GrafPorNPtree35 68ms43388kbC++172.0kb2024-07-06 22:16:362024-07-06 22:16:36

Judging History

你现在查看的是最新测评结果

  • [2024-07-06 22:16:36]
  • 评测
  • 测评结果:35
  • 用时:68ms
  • 内存:43388kb
  • [2024-07-06 22:16:36]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

const int N = 2e5 + 5;

int du[N], ox[N], oy[N], vis[N];
vector<int> G[N], T[N + (N >> 1)];
unordered_map<int, int> M[N];
int vs[N + (N >> 1)], siz[N + (N >> 1)], rt;

void dfsRt(int x, int fa = -1) {
    siz[x] = 1;
    int flg = 1;
    for (auto v : T[x]) if (v != fa && !vs[v]) {
        dfsRt(v, x), siz[x] += siz[v], flg &= (siz[v] <= siz[0] / 2);
    }
    if (flg && siz[0] - siz[x] <= siz[0] / 2) {
        if (rt && rt != x) puts("ne"), exit(0);
        rt = x;
    }
    return;
}

int findRt(int x) {
    rt = 0, siz[0] = siz[x];
    dfsRt(x), dfsRt(rt);
    int c = 0;
    for (auto v : T[rt]) {
        c += (!vs[v]);
        if (!vs[v] && siz[v] != siz[rt] / 3) {
            puts("ne"), exit(0);
        }
    }
    if (c && c != 3) puts("ne"), exit(0);
    return rt;
}

void dfs(int x) {
    vs[x] = 1;
    for (auto v : T[x]) if (!vs[v]) dfs(findRt(v));
}

signed main() {
    int n, m; scanf("%d%d", &n, &m);
    vector<int> V{1}, E{0};
    while (V.back() < n) {
        V.push_back(V.back() * 3), E.push_back(E.back() * 3 + 3);
    }
    if (n != V.back() || m != E.back()) return 0 & puts("ne");
    for (int i = 1; i <= m; ++i) {
        scanf("%d%d", &ox[i], &oy[i]);
        ++du[ox[i]], ++du[oy[i]];
    }
    for (int i = 1; i <= m; ++i) {
        if (du[ox[i]] > du[oy[i]] || (du[ox[i]] == du[oy[i]] && ox[i] > oy[i])) swap(ox[i], oy[i]);
        G[ox[i]].push_back(oy[i]);
    }
    int s = n;
    for (int i = 1; i <= n; ++i) {
        for (auto v : G[i]) vis[v] = i;
        for (auto v : G[i]) for (auto w : G[v]) if (vis[w] == i) {
            if (M[i][v]++ || M[i][w]++ || M[v][w]++) return 0 & puts("ne");
            ++s;
            T[i].push_back(s), T[s].push_back(i);
            T[v].push_back(s), T[s].push_back(v);
            T[w].push_back(s), T[s].push_back(w);
        }
    }
    if (s != n + m / 3) return 0 & puts("ne");
    siz[1] = n;
    dfs(findRt(1));
    puts("da");
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 15
Accepted

Test #1:

score: 15
Accepted
time: 0ms
memory: 30600kb

input:

9 12
7 9
1 5
8 5
4 6
3 4
1 8
6 3
7 5
2 9
4 5
7 4
2 7

output:

da

result:

ok single line: 'da'

Test #2:

score: 0
Accepted
time: 0ms
memory: 30296kb

input:

9 12
8 5
3 9
1 7
7 2
3 6
3 7
4 7
1 4
5 2
8 2
6 9
3 2

output:

da

result:

ok single line: 'da'

Test #3:

score: 0
Accepted
time: 3ms
memory: 28252kb

input:

9 13
3 1
9 7
2 4
7 8
8 7
5 6
9 8
3 4
8 2
4 8
2 5
2 6
4 1

output:

ne

result:

ok single line: 'ne'

Test #4:

score: 0
Accepted
time: 4ms
memory: 28560kb

input:

9 13
5 4
1 5
8 7
8 5
3 2
5 2
2 6
6 3
7 9
1 4
2 8
9 8
8 9

output:

ne

result:

ok single line: 'ne'

Test #5:

score: 0
Accepted
time: 0ms
memory: 28268kb

input:

9 12
4 2
3 5
3 7
2 7
2 1
2 8
1 4
5 4
7 5
8 4
7 1
3 2

output:

ne

result:

ok single line: 'ne'

Test #6:

score: 0
Accepted
time: 4ms
memory: 28180kb

input:

9 13
7 5
6 5
4 9
3 2
6 1
5 2
7 9
1 8
7 4
6 7
5 3
8 6
1 8

output:

ne

result:

ok single line: 'ne'

Test #7:

score: 0
Accepted
time: 4ms
memory: 28264kb

input:

9 12
2 6
5 1
8 4
6 3
7 2
9 5
9 1
3 4
6 9
3 8
6 7
6 1

output:

ne

result:

ok single line: 'ne'

Test #8:

score: 0
Accepted
time: 4ms
memory: 30316kb

input:

9 12
2 6
1 2
2 5
3 8
1 6
2 9
5 9
7 1
3 6
6 8
4 1
7 4

output:

da

result:

ok single line: 'da'

Test #9:

score: 0
Accepted
time: 2ms
memory: 28320kb

input:

9 13
2 9
8 7
7 2
6 3
4 2
1 6
1 7
3 1
1 3
7 5
8 5
4 9
2 1

output:

ne

result:

ok single line: 'ne'

Test #10:

score: 0
Accepted
time: 2ms
memory: 28180kb

input:

9 13
1 4
8 9
5 3
3 9
2 7
9 6
1 5
4 5
7 3
6 8
9 8
9 5
3 2

output:

ne

result:

ok single line: 'ne'

Test #11:

score: 0
Accepted
time: 4ms
memory: 28256kb

input:

9 12
1 8
2 8
7 3
4 7
6 4
1 5
5 6
8 5
6 3
3 4
8 6
4 1

output:

ne

result:

ok single line: 'ne'

Test #12:

score: 0
Accepted
time: 8ms
memory: 30372kb

input:

9 12
4 8
2 7
8 2
1 3
1 2
8 7
6 7
3 2
8 5
5 4
7 9
9 6

output:

da

result:

ok single line: 'da'

Test #13:

score: 0
Accepted
time: 4ms
memory: 28288kb

input:

9 12
7 8
4 6
5 4
1 4
9 3
8 2
6 5
9 1
2 7
4 2
2 3
3 1

output:

ne

result:

ok single line: 'ne'

Test #14:

score: 0
Accepted
time: 0ms
memory: 28268kb

input:

9 12
3 9
8 9
8 4
2 5
7 1
1 6
2 6
1 9
6 7
9 4
3 1
6 5

output:

ne

result:

ok single line: 'ne'

Test #15:

score: 0
Accepted
time: 0ms
memory: 30368kb

input:

9 12
2 8
6 3
1 7
6 2
8 1
2 5
8 6
2 3
4 7
4 1
1 3
9 4

output:

ne

result:

ok single line: 'ne'

Test #16:

score: 0
Accepted
time: 0ms
memory: 28196kb

input:

9 12
4 6
5 7
2 1
1 7
2 3
8 1
8 4
1 5
1 6
5 8
1 3
6 2

output:

ne

result:

ok single line: 'ne'

Test #17:

score: 0
Accepted
time: 0ms
memory: 28560kb

input:

9 12
6 8
1 7
5 8
5 3
3 4
3 8
8 7
1 4
4 2
4 7
4 6
2 5

output:

ne

result:

ok single line: 'ne'

Test #18:

score: 0
Accepted
time: 0ms
memory: 28252kb

input:

9 12
1 7
3 5
2 3
4 7
5 9
4 9
1 4
6 9
8 6
5 2
1 5
9 8

output:

ne

result:

ok single line: 'ne'

Test #19:

score: 0
Accepted
time: 4ms
memory: 30372kb

input:

9 12
2 7
8 7
8 2
4 3
4 9
5 1
8 6
8 4
9 3
1 6
2 1
6 5

output:

ne

result:

ok single line: 'ne'

Test #20:

score: 0
Accepted
time: 4ms
memory: 30244kb

input:

9 12
7 3
2 3
7 9
7 4
6 4
3 4
3 5
9 1
5 2
4 8
7 1
8 6

output:

da

result:

ok single line: 'da'

Test #21:

score: 0
Accepted
time: 4ms
memory: 30608kb

input:

9 13
3 7
3 8
3 1
8 7
5 1
7 4
5 3
2 6
8 2
9 7
6 8
2 6
4 9

output:

ne

result:

ok single line: 'ne'

Test #22:

score: 0
Accepted
time: 4ms
memory: 28224kb

input:

9 12
5 1
9 2
9 5
4 1
9 1
6 2
1 2
6 8
3 7
4 7
3 4
8 2

output:

ne

result:

ok single line: 'ne'

Test #23:

score: 0
Accepted
time: 4ms
memory: 30300kb

input:

9 12
8 6
5 1
2 9
9 4
2 5
1 2
3 1
3 7
7 1
5 6
5 8
4 2

output:

da

result:

ok single line: 'da'

Test #24:

score: 0
Accepted
time: 0ms
memory: 30376kb

input:

9 12
5 1
4 9
7 5
4 2
3 7
9 3
8 2
3 5
2 6
7 8
7 4
1 9

output:

ne

result:

ok single line: 'ne'

Test #25:

score: 0
Accepted
time: 4ms
memory: 30248kb

input:

9 12
4 2
3 9
3 5
2 6
5 8
8 3
7 4
2 1
7 6
1 9
4 1
5 1

output:

ne

result:

ok single line: 'ne'

Test #26:

score: 0
Accepted
time: 4ms
memory: 28324kb

input:

9 13
6 8
9 7
1 3
4 1
9 2
3 9
3 4
6 5
2 7
3 6
9 6
5 6
8 5

output:

ne

result:

ok single line: 'ne'

Test #27:

score: 0
Accepted
time: 4ms
memory: 30296kb

input:

9 12
1 3
8 6
8 7
1 5
8 5
2 5
7 5
6 7
4 3
7 2
4 6
2 3

output:

ne

result:

ok single line: 'ne'

Test #28:

score: 0
Accepted
time: 7ms
memory: 30296kb

input:

9 12
5 9
9 6
5 1
4 1
3 6
4 2
7 5
6 7
5 4
6 2
6 1
3 1

output:

ne

result:

ok single line: 'ne'

Test #29:

score: 0
Accepted
time: 0ms
memory: 28520kb

input:

9 12
3 2
1 5
5 7
2 7
6 2
7 4
1 8
4 1
1 6
8 3
6 5
5 2

output:

ne

result:

ok single line: 'ne'

Test #30:

score: 0
Accepted
time: 0ms
memory: 30368kb

input:

9 12
2 5
6 1
3 8
3 2
3 4
7 2
3 7
2 9
8 4
6 7
5 9
1 7

output:

da

result:

ok single line: 'da'

Test #31:

score: 0
Accepted
time: 4ms
memory: 30316kb

input:

9 12
4 1
2 4
3 9
9 2
9 5
3 7
7 9
1 2
8 6
5 2
5 8
6 5

output:

da

result:

ok single line: 'da'

Test #32:

score: 0
Accepted
time: 3ms
memory: 28256kb

input:

9 12
9 5
6 9
3 2
6 5
7 2
8 1
7 8
2 4
2 5
4 3
1 7
5 7

output:

da

result:

ok single line: 'da'

Test #33:

score: 0
Accepted
time: 0ms
memory: 28192kb

input:

9 12
7 9
4 2
9 8
9 4
1 7
8 3
6 7
1 6
3 5
5 8
2 9
8 7

output:

da

result:

ok single line: 'da'

Test #34:

score: 0
Accepted
time: 7ms
memory: 30368kb

input:

9 12
5 6
2 3
5 2
9 7
8 5
6 9
6 7
6 2
2 1
3 1
4 8
5 4

output:

da

result:

ok single line: 'da'

Subtask #2:

score: 20
Accepted

Test #35:

score: 20
Accepted
time: 0ms
memory: 28260kb

input:

729 1093
340 310
430 713
576 240
138 297
618 162
328 418
143 713
568 220
252 387
219 400
593 491
330 472
722 643
679 598
356 112
701 213
344 408
500 190
225 72
351 688
283 542
215 449
135 194
306 382
266 83
576 289
563 721
345 656
567 694
580 355
127 487
352 310
687 322
620 520
583 466
678 308
19 10...

output:

ne

result:

ok single line: 'ne'

Test #36:

score: 0
Accepted
time: 0ms
memory: 28568kb

input:

729 1092
638 250
254 320
297 589
143 720
686 343
468 25
722 60
190 624
421 63
612 42
270 146
577 541
70 707
363 484
286 178
643 210
112 70
7 455
211 431
209 484
386 45
585 402
184 326
557 382
180 406
30 686
299 634
268 97
342 687
172 377
233 505
86 174
105 372
333 466
491 579
390 465
477 176
348 427...

output:

ne

result:

ok single line: 'ne'

Test #37:

score: 0
Accepted
time: 4ms
memory: 30580kb

input:

729 1092
301 205
596 371
190 64
77 258
283 304
306 454
210 177
327 251
20 388
185 482
339 284
313 586
368 338
612 47
613 323
559 114
233 296
271 397
705 714
125 159
49 496
286 174
278 521
456 134
422 123
201 283
314 599
354 328
492 339
49 153
628 334
275 190
505 275
326 15
241 348
42 102
65 717
224 ...

output:

ne

result:

ok single line: 'ne'

Test #38:

score: 0
Accepted
time: 3ms
memory: 30596kb

input:

243 363
31 225
187 117
147 160
229 44
168 179
164 107
173 146
78 102
47 50
38 13
222 83
115 24
14 240
185 61
199 111
119 225
98 80
126 102
42 235
43 216
59 129
109 193
179 27
218 142
114 50
46 174
47 99
120 6
103 221
136 187
19 191
65 180
57 160
166 83
185 229
48 139
114 143
150 101
208 80
24 74
7 6...

output:

ne

result:

ok single line: 'ne'

Test #39:

score: 0
Accepted
time: 4ms
memory: 30244kb

input:

729 1093
73 12
701 403
473 596
214 290
248 310
317 639
507 457
298 227
185 326
430 27
61 34
547 636
99 685
607 45
6 101
283 377
310 33
42 132
573 647
483 658
112 113
647 324
518 616
302 247
71 465
586 187
81 396
621 606
435 498
667 677
24 333
414 497
111 164
510 628
665 82
325 719
536 556
719 704
24...

output:

ne

result:

ok single line: 'ne'

Test #40:

score: 0
Accepted
time: 0ms
memory: 30332kb

input:

729 1092
663 607
327 712
424 22
507 89
138 363
465 228
129 291
389 682
73 477
581 622
582 543
78 487
55 479
186 50
619 167
490 615
677 191
42 574
323 136
283 120
433 325
531 530
144 24
620 239
368 225
12 166
452 686
361 526
248 709
586 606
39 110
229 696
686 647
260 333
403 150
88 462
529 449
513 35...

output:

ne

result:

ok single line: 'ne'

Test #41:

score: 0
Accepted
time: 4ms
memory: 28736kb

input:

729 1092
659 490
150 263
166 478
382 659
135 290
603 656
601 301
64 689
81 160
197 133
438 593
379 482
522 493
238 72
362 664
648 240
471 168
32 153
282 407
648 492
276 218
593 106
193 537
613 369
632 167
235 236
663 319
37 416
577 659
111 601
578 483
645 529
100 636
457 312
200 161
515 344
591 706
...

output:

da

result:

ok single line: 'da'

Test #42:

score: 0
Accepted
time: 4ms
memory: 30460kb

input:

729 1092
41 88
232 540
170 36
637 536
472 562
295 573
266 256
5 287
471 587
595 18
337 113
682 24
408 231
21 596
288 595
292 260
614 46
601 673
16 242
548 133
107 264
60 204
369 600
460 108
135 333
578 278
639 388
93 425
4 665
7 74
337 235
251 274
331 206
171 675
387 588
22 481
591 4
101 443
607 239...

output:

da

result:

ok single line: 'da'

Test #43:

score: 0
Accepted
time: 3ms
memory: 30720kb

input:

729 1092
161 296
166 402
4 482
199 80
249 437
625 212
70 440
262 560
85 250
368 347
184 371
86 262
360 37
273 691
112 311
551 278
369 417
483 502
144 310
497 463
224 514
201 585
700 656
96 596
679 119
380 578
2 512
279 173
397 524
524 170
438 110
105 541
551 352
506 426
21 35
337 684
575 617
318 499...

output:

ne

result:

ok single line: 'ne'

Test #44:

score: 0
Accepted
time: 2ms
memory: 30772kb

input:

729 1092
709 176
276 466
158 172
299 278
174 508
303 248
647 581
93 445
442 472
166 591
77 388
687 331
714 257
627 47
242 291
321 429
47 254
36 523
135 558
58 303
547 719
560 640
538 601
654 379
567 295
88 262
451 717
415 546
83 153
352 581
322 416
81 234
191 104
367 386
143 566
640 552
624 713
671 ...

output:

da

result:

ok single line: 'da'

Test #45:

score: 0
Accepted
time: 4ms
memory: 28256kb

input:

243 363
31 12
43 195
20 121
239 68
104 94
111 173
45 52
221 56
135 238
104 161
194 149
47 5
136 202
106 131
79 115
80 226
201 62
86 61
117 163
121 169
188 237
110 235
9 148
197 154
216 167
68 180
152 160
94 113
50 88
59 36
114 150
96 175
231 217
108 179
142 243
158 38
167 33
127 152
135 116
41 137
2...

output:

ne

result:

ok single line: 'ne'

Test #46:

score: 0
Accepted
time: 0ms
memory: 30592kb

input:

243 364
73 123
137 207
224 111
88 209
1 39
180 78
226 162
225 20
227 189
230 242
15 238
182 220
230 74
203 73
190 2
237 52
135 156
60 163
208 97
60 40
85 44
175 97
157 131
14 152
124 211
82 243
105 44
168 16
17 140
214 128
197 4
225 65
56 73
49 224
102 205
205 198
231 100
20 65
31 104
175 21
2 196
1...

output:

ne

result:

ok single line: 'ne'

Test #47:

score: 0
Accepted
time: 0ms
memory: 30296kb

input:

243 363
117 87
95 212
22 227
185 203
137 115
41 132
220 134
84 2
16 47
105 65
114 222
153 207
20 240
92 111
42 178
64 22
87 90
162 209
206 203
64 98
46 224
193 86
238 182
198 92
112 28
218 44
226 67
200 145
56 138
127 12
133 5
136 83
109 220
230 219
81 169
58 65
144 138
76 241
51 175
120 155
117 139...

output:

ne

result:

ok single line: 'ne'

Test #48:

score: 0
Accepted
time: 8ms
memory: 30724kb

input:

729 1092
364 211
282 361
512 344
385 107
443 97
643 403
642 256
665 197
600 63
149 686
520 367
93 147
674 585
389 441
651 675
388 517
640 329
122 99
369 476
347 355
202 521
308 702
218 485
173 247
371 255
69 507
304 79
703 408
409 47
242 462
602 221
157 227
350 301
594 139
564 381
155 194
463 672
28...

output:

da

result:

ok single line: 'da'

Test #49:

score: 0
Accepted
time: 3ms
memory: 30652kb

input:

243 363
166 134
37 32
204 77
211 99
152 231
14 184
139 184
208 157
61 139
135 76
11 156
241 15
63 226
163 170
141 34
24 159
58 99
187 68
210 112
7 66
113 129
129 237
84 83
197 240
69 233
217 241
71 90
171 166
153 109
227 137
138 72
174 92
91 76
59 27
178 235
54 28
226 187
223 101
179 201
85 120
37 1...

output:

da

result:

ok single line: 'da'

Test #50:

score: 0
Accepted
time: 4ms
memory: 30432kb

input:

729 1092
563 458
399 550
719 152
587 622
473 88
101 660
300 269
315 705
330 403
86 334
451 392
221 540
440 438
435 11
388 414
564 693
108 633
395 35
370 288
261 277
351 395
435 589
517 27
373 24
24 297
543 562
463 254
337 255
48 617
563 10
352 315
420 356
200 667
720 656
282 717
388 444
440 479
530 ...

output:

da

result:

ok single line: 'da'

Test #51:

score: 0
Accepted
time: 4ms
memory: 30444kb

input:

729 1092
672 229
104 307
450 623
342 691
14 452
186 98
22 456
286 418
343 417
393 449
108 224
505 132
175 204
243 200
615 67
708 72
246 143
208 643
549 65
71 197
652 140
682 126
252 377
148 55
10 566
717 615
305 426
36 522
64 546
258 241
722 302
602 217
470 517
713 558
122 94
114 484
90 225
376 357
...

output:

ne

result:

ok single line: 'ne'

Test #52:

score: 0
Accepted
time: 0ms
memory: 28420kb

input:

729 1092
431 93
532 699
376 80
547 109
305 426
206 465
564 100
287 309
54 290
635 669
229 569
183 504
569 38
190 616
581 428
521 490
554 140
701 577
652 661
440 112
509 19
330 543
88 474
344 715
655 559
566 570
384 476
659 180
35 324
503 373
368 577
723 222
616 713
692 4
492 67
85 128
79 591
114 557...

output:

ne

result:

ok single line: 'ne'

Test #53:

score: 0
Accepted
time: 4ms
memory: 30316kb

input:

729 1092
658 91
214 341
484 399
390 301
66 362
715 89
294 313
306 107
536 334
665 270
106 157
154 217
477 665
24 21
36 211
606 326
237 524
725 230
616 153
545 696
255 725
30 104
160 496
345 139
138 124
439 286
443 659
192 276
389 701
136 77
533 462
406 567
409 533
349 658
351 667
658 508
453 411
33 ...

output:

ne

result:

ok single line: 'ne'

Test #54:

score: 0
Accepted
time: 3ms
memory: 28264kb

input:

243 364
18 173
8 187
173 213
218 130
192 127
123 81
120 53
43 137
195 96
171 234
231 78
10 210
5 13
81 108
222 13
66 22
20 216
212 159
12 135
211 160
26 17
47 150
151 2
29 108
243 36
105 86
52 99
38 241
153 197
11 12
226 82
99 230
223 40
233 162
54 157
157 38
116 85
124 88
200 202
68 198
23 127
24 1...

output:

ne

result:

ok single line: 'ne'

Test #55:

score: 0
Accepted
time: 4ms
memory: 28556kb

input:

729 1093
533 356
366 277
254 549
715 548
654 507
288 444
293 146
593 94
63 618
317 353
299 465
256 162
266 575
683 273
188 8
667 682
384 181
274 675
394 607
478 260
321 217
125 289
323 557
495 576
240 380
535 674
561 452
535 524
511 54
574 264
476 639
609 726
16 566
265 11
483 520
569 310
628 409
21...

output:

ne

result:

ok single line: 'ne'

Test #56:

score: 0
Accepted
time: 4ms
memory: 30388kb

input:

729 1092
687 575
655 552
423 652
630 530
212 441
658 614
544 162
13 253
497 479
319 478
348 691
211 468
720 327
344 209
122 127
324 402
349 635
223 85
579 695
609 110
638 506
335 553
541 245
60 545
673 150
723 201
422 234
78 242
376 71
611 333
545 514
688 50
471 725
691 478
250 6
147 325
491 231
697...

output:

ne

result:

ok single line: 'ne'

Test #57:

score: 0
Accepted
time: 0ms
memory: 28428kb

input:

729 1092
1 89
251 68
195 497
193 281
267 81
708 726
24 654
642 40
508 475
246 234
635 190
431 538
153 663
132 697
542 495
93 56
463 164
534 22
681 139
643 579
239 679
379 98
99 53
529 184
724 712
349 311
729 633
133 33
577 202
351 244
244 295
243 157
376 550
498 595
304 334
634 615
614 632
174 194
3...

output:

da

result:

ok single line: 'da'

Test #58:

score: 0
Accepted
time: 0ms
memory: 30632kb

input:

729 1092
129 261
646 593
151 21
228 278
166 182
211 347
2 102
251 570
195 557
164 74
220 135
464 70
220 501
46 609
33 593
28 335
374 541
641 109
188 514
488 587
446 51
87 584
698 650
649 65
569 78
685 614
504 302
30 514
332 645
412 489
286 525
691 418
550 15
221 548
538 168
361 98
489 211
144 580
66...

output:

ne

result:

ok single line: 'ne'

Test #59:

score: 0
Accepted
time: 4ms
memory: 28252kb

input:

243 363
81 88
178 241
107 160
9 136
171 163
147 98
130 185
4 11
234 89
178 45
206 108
232 41
1 63
36 70
171 206
171 120
228 125
208 111
79 102
232 125
27 43
239 24
151 19
212 76
215 70
173 5
153 60
57 39
231 131
39 76
139 136
60 148
80 151
190 146
158 105
211 186
219 156
183 98
212 118
161 67
87 120...

output:

ne

result:

ok single line: 'ne'

Test #60:

score: 0
Accepted
time: 0ms
memory: 30320kb

input:

729 1092
672 211
700 220
21 345
544 411
357 191
704 360
432 707
318 594
275 97
557 425
175 190
61 143
245 137
26 295
595 355
416 323
115 59
83 157
279 339
393 227
616 478
531 555
202 75
703 50
170 477
287 251
104 484
3 575
186 100
266 298
92 440
639 195
416 428
295 691
591 533
670 55
194 327
140 40
...

output:

ne

result:

ok single line: 'ne'

Test #61:

score: 0
Accepted
time: 8ms
memory: 30276kb

input:

9 12
1 3
8 6
8 7
1 5
8 5
2 5
7 5
6 7
4 3
7 2
4 6
2 3

output:

ne

result:

ok single line: 'ne'

Test #62:

score: 0
Accepted
time: 4ms
memory: 28316kb

input:

9 12
5 9
9 6
5 1
4 1
3 6
4 2
7 5
6 7
5 4
6 2
6 1
3 1

output:

ne

result:

ok single line: 'ne'

Test #63:

score: 0
Accepted
time: 0ms
memory: 30368kb

input:

9 12
3 2
1 5
5 7
2 7
6 2
7 4
1 8
4 1
1 6
8 3
6 5
5 2

output:

ne

result:

ok single line: 'ne'

Test #64:

score: 0
Accepted
time: 0ms
memory: 28432kb

input:

729 1092
142 561
224 117
716 713
601 310
353 173
719 525
720 79
711 346
139 72
280 709
49 38
18 9
85 45
209 469
263 611
321 558
174 404
479 473
386 31
668 397
594 531
445 385
11 560
232 712
180 28
472 294
638 184
522 532
368 728
40 224
663 629
245 726
697 571
256 695
336 729
650 311
483 333
319 66
6...

output:

da

result:

ok single line: 'da'

Test #65:

score: 0
Accepted
time: 4ms
memory: 28732kb

input:

729 1092
580 12
471 231
70 471
379 45
436 542
282 46
422 344
579 32
125 405
14 168
568 429
119 218
557 653
90 76
131 346
406 216
67 117
385 651
12 35
718 684
585 141
375 151
140 463
470 585
520 327
409 18
593 521
170 515
450 475
187 603
558 125
565 549
335 303
509 672
618 461
647 170
86 229
580 35
2...

output:

da

result:

ok single line: 'da'

Test #66:

score: 0
Accepted
time: 0ms
memory: 28616kb

input:

243 363
25 10
104 194
127 185
141 2
11 214
63 66
108 1
47 122
144 154
104 146
20 199
57 13
229 86
102 168
171 121
201 73
92 37
139 9
65 29
57 33
242 196
25 202
130 231
175 220
14 105
131 46
223 238
26 175
102 31
34 190
65 215
80 163
206 173
152 114
93 57
158 4
107 213
174 54
128 100
153 212
156 168
...

output:

da

result:

ok single line: 'da'

Test #67:

score: 0
Accepted
time: 0ms
memory: 30440kb

input:

729 1092
195 182
162 405
348 626
299 241
216 80
330 403
115 87
557 456
67 139
314 107
365 474
341 729
695 658
9 21
649 628
167 328
66 309
647 83
287 590
292 690
86 681
450 143
516 295
50 517
411 445
608 200
606 214
590 376
489 492
592 455
390 676
272 559
217 463
74 726
486 232
228 325
97 139
145 493...

output:

da

result:

ok single line: 'da'

Test #68:

score: 0
Accepted
time: 0ms
memory: 28732kb

input:

729 1092
154 294
29 326
146 612
144 122
426 686
369 670
204 629
397 184
356 725
383 13
495 329
371 123
526 683
282 619
314 95
716 1
515 563
476 23
538 466
240 175
721 669
395 491
56 289
588 511
249 553
527 271
346 453
445 401
94 381
242 51
282 628
628 237
218 114
486 113
576 474
273 403
366 303
21 6...

output:

da

result:

ok single line: 'da'

Subtask #3:

score: 0
Wrong Answer

Test #69:

score: 15
Accepted
time: 49ms
memory: 35472kb

input:

177147 265719
79646 110581
42107 166686
174516 92541
11418 84874
89568 79680
101533 167489
143016 26545
83401 102450
122789 91031
140172 64836
143906 82843
45757 98991
164963 130550
33432 152305
80043 16055
49162 39443
59476 89357
146429 111186
99327 115855
166381 89990
91164 139281
121510 124610
16...

output:

ne

result:

ok single line: 'ne'

Test #70:

score: 0
Accepted
time: 48ms
memory: 34040kb

input:

177147 265719
38681 77992
106972 53905
88649 110477
113934 98724
78662 109263
134699 83502
31991 92472
126170 144
119650 132169
84458 92531
24682 66176
131541 177081
97342 131339
103685 102763
130223 36375
142925 66285
105340 117815
111137 162166
43022 15242
120307 54486
78258 164394
52991 104308
65...

output:

ne

result:

ok single line: 'ne'

Test #71:

score: 0
Accepted
time: 49ms
memory: 34344kb

input:

177147 265719
80151 35717
121902 3023
160759 169382
24887 142159
40782 159514
23600 98839
121180 62418
122763 152478
148678 114794
11943 72581
173127 2884
97280 4969
155030 45742
120300 148466
134742 140635
79483 24583
71636 91841
140421 126108
44434 53426
133218 79051
161302 161964
59589 111719
961...

output:

ne

result:

ok single line: 'ne'

Test #72:

score: 0
Accepted
time: 68ms
memory: 42472kb

input:

177147 265719
23535 148931
151961 42693
126734 69633
41675 97286
148290 110970
18165 83792
5192 133074
101128 76523
76671 146056
37165 145496
108304 76746
47477 140906
73419 48220
39470 54859
81251 91381
88943 87801
102113 126514
153800 35348
116125 49494
114248 11690
150336 26095
40669 90388
3210 9...

output:

ne

result:

ok single line: 'ne'

Test #73:

score: 0
Accepted
time: 8ms
memory: 28264kb

input:

177147 265720
170712 62225
99915 128584
115624 72186
110450 90393
65021 158547
110390 161798
28967 132365
78897 47218
68752 69351
40606 17503
79654 32708
98155 146206
156781 52063
126696 159590
11625 167534
29472 10242
143508 43084
154423 175381
150212 141153
5882 3903
142063 39110
158366 31577
2263...

output:

ne

result:

ok single line: 'ne'

Test #74:

score: -15
Wrong Answer
time: 50ms
memory: 38704kb

input:

177147 265719
67351 167238
129901 55608
68480 135374
104799 141169
109735 94431
87690 136110
134896 150128
94005 84319
29006 124099
31988 157247
99008 24808
30090 15310
10480 16443
98191 89543
98109 139907
59896 166679
121226 129438
83139 84515
163834 143237
162513 60464
6858 120706
23808 13193
8871...

output:

ne

result:

wrong answer 1st lines differ - expected: 'da', found: 'ne'

Subtask #4:

score: 0
Wrong Answer

Test #103:

score: 50
Accepted
time: 47ms
memory: 34496kb

input:

177147 265719
132920 57252
64370 50983
162323 103641
126430 64347
64421 107962
35533 30427
171597 160614
120187 121996
103235 117200
122594 156637
121481 108177
115386 6337
28269 153079
43775 171594
164425 165290
59340 170257
20858 74213
162837 103195
171976 121082
68853 33317
152714 8959
47095 9036...

output:

ne

result:

ok single line: 'ne'

Test #104:

score: 0
Accepted
time: 0ms
memory: 28176kb

input:

177147 265720
98251 19107
36929 5082
59297 17482
166275 130189
125119 161493
151977 35937
4540 92380
52037 36475
105282 76892
8397 7997
162679 100647
12685 34568
53625 30405
136245 147693
95596 151955
66119 156086
92822 98840
66600 97472
42324 130091
34459 150929
81661 38148
1174 30859
113776 90353
...

output:

ne

result:

ok single line: 'ne'

Test #105:

score: 0
Accepted
time: 19ms
memory: 30340kb

input:

59049 88572
14041 31673
1168 11350
38714 28802
37877 22048
49987 22707
26786 49980
2818 13974
10003 17358
51907 30794
16816 20935
8685 53622
49148 54509
3371 26238
50806 4657
57731 38759
38131 9810
28974 19191
5485 27763
9140 36793
45914 17712
23433 31979
29334 8721
7313 42734
12130 24011
36906 5164...

output:

ne

result:

ok single line: 'ne'

Test #106:

score: 0
Accepted
time: 48ms
memory: 34884kb

input:

177147 265719
119867 167070
130132 12752
120764 56321
15572 66501
139543 82691
70068 42197
61383 135281
122332 161897
68678 68884
51691 172281
33415 150511
101102 101300
108117 151586
39194 21123
173495 82522
134499 170131
15461 53912
114257 106087
137475 32697
31578 172314
139488 145536
118015 1288...

output:

ne

result:

ok single line: 'ne'

Test #107:

score: 0
Accepted
time: 51ms
memory: 34416kb

input:

177147 265719
32229 30186
75313 76163
111944 168135
43914 37095
22266 44860
166052 93754
169557 55704
108797 163872
45432 112994
80343 100383
110188 66178
135008 105902
155873 72661
44225 151314
2720 88316
66950 133820
20039 85930
91897 17236
40370 91049
112750 27809
48067 13266
126431 53691
127666 ...

output:

ne

result:

ok single line: 'ne'

Test #108:

score: 0
Accepted
time: 31ms
memory: 43388kb

input:

59049 88572
26511 33490
28852 45905
27461 12238
3574 21240
10401 47111
25108 30094
41731 23065
34029 50912
24637 3051
39816 52369
17677 44545
29603 11717
24661 41876
6322 19702
11178 38322
12480 26080
47105 3194
12178 36578
32634 16221
25540 24583
42234 24601
15926 7470
5428 20505
18895 24343
6641 2...

output:

ne

result:

ok single line: 'ne'

Test #109:

score: 0
Accepted
time: 58ms
memory: 35104kb

input:

177147 265719
109974 161035
10257 149062
121470 37587
101821 92037
121099 27132
31616 170660
46299 85346
105465 61610
133310 53913
20419 23471
11021 49161
161237 108062
27418 106411
42549 75808
90998 78111
32550 19003
10562 170797
77403 67800
34756 24189
88268 56154
14749 154026
5889 159314
104655 1...

output:

ne

result:

ok single line: 'ne'

Test #110:

score: 0
Accepted
time: 68ms
memory: 41824kb

input:

177147 265719
108664 58201
64269 6343
120585 157969
151929 136534
168726 15269
25610 60139
11181 158806
139226 97957
107369 141067
135947 160932
162045 50711
105512 5940
172321 5888
7221 99888
120318 20857
24810 151590
135587 8881
143228 24034
6096 39018
73071 58377
173193 124153
97410 69946
74197 7...

output:

ne

result:

ok single line: 'ne'

Test #111:

score: 0
Accepted
time: 44ms
memory: 35020kb

input:

177147 265719
32981 44699
147062 61378
88263 172913
58385 30028
98963 22183
21517 65343
40334 104039
63687 1318
136538 117786
2824 90817
170979 107527
93628 112008
35891 28456
164720 154877
2494 115639
119501 113995
31926 105269
92857 99010
174834 17842
11538 142621
125432 105466
135353 157000
68024...

output:

ne

result:

ok single line: 'ne'

Test #112:

score: 0
Accepted
time: 47ms
memory: 34420kb

input:

177147 265719
167966 17672
92091 174891
69156 176406
144245 124379
124290 42270
59738 92303
86870 83034
79441 52547
15702 45945
164475 43564
132133 61402
27448 122029
45378 131195
35639 152970
550 29347
134069 145338
111946 144913
58629 120345
90261 66787
8482 156139
106048 76828
151397 165340
22520...

output:

ne

result:

ok single line: 'ne'

Test #113:

score: 0
Accepted
time: 4ms
memory: 28288kb

input:

177147 265720
84549 59066
8533 97512
95654 45173
28525 150968
86580 149227
57726 67651
52781 160528
97950 141266
100850 14838
166553 138190
61634 14254
57547 24000
168524 11255
116362 130964
170815 172567
120074 7542
128396 3289
29898 125597
163966 69876
50139 142020
84785 71240
22378 26807
135344 1...

output:

ne

result:

ok single line: 'ne'

Test #114:

score: 0
Accepted
time: 53ms
memory: 35748kb

input:

177147 265719
68898 132920
29665 73506
20531 169214
103475 58989
61733 32239
151574 63398
119411 169525
24793 25207
41292 44383
133706 111802
174419 1600
74876 147063
161499 174674
10278 7799
123599 8481
146302 166032
1313 90856
60646 95512
106779 134984
41603 43637
15001 37449
153582 123699
108004 ...

output:

ne

result:

ok single line: 'ne'

Test #115:

score: 0
Accepted
time: 7ms
memory: 28320kb

input:

59049 88573
48002 20129
7630 33065
13470 58907
56979 49428
24783 51171
35198 55138
26000 13842
56782 34295
54165 5732
52635 46706
40182 1575
48144 56529
25104 1814
30791 45557
24736 48013
51257 51882
26582 54128
26950 47776
18073 51674
24939 54097
24871 44506
23664 28536
3218 34786
44770 14839
46589...

output:

ne

result:

ok single line: 'ne'

Test #116:

score: -50
Wrong Answer
time: 45ms
memory: 34632kb

input:

177147 265719
134788 176770
110415 30012
70814 170685
31716 97968
166427 107186
55319 99947
990 168895
127047 57299
122397 109455
67762 167879
120077 134331
18803 64603
48445 33935
104943 45500
128895 87604
148759 151945
94766 103320
129651 15389
26640 140574
173781 39496
132805 125367
168455 59830
...

output:

ne

result:

wrong answer 1st lines differ - expected: 'da', found: 'ne'