QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#365265#6666. Graflukap_65 319ms30548kbC++143.4kb2024-03-24 23:13:112024-03-24 23:13:13

Judging History

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

  • [2024-03-24 23:13:13]
  • 评测
  • 测评结果:65
  • 用时:319ms
  • 内存:30548kb
  • [2024-03-24 23:13:11]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

const int MAXN = 2e5 + 500;
const int MAXM = 3e5 + 500;

int n, m;
vector<pair<int, int> > susjedi[MAXN], bridovi;
int maknut[MAXM];
int provc[20], provv[20], kolko, bio[MAXN], d[MAXN], w[MAXN];
vector<int> v;
int cnt;

void dfs (int x) {
    v.push_back (x);
    bio[x] = cnt;
    w[x] = 1;
    for (auto it: susjedi[x]) {
        if (maknut[it.second]) continue;
        int nx = it.first;
        if (bio[nx] != cnt) {
            d[nx] = d[x] + 1;
            dfs (nx);
            w[x] += w[nx];
        }
        bridovi.push_back ({x, nx});
    }
}

int pogle (int x, int y) {
    for (auto it: susjedi[x]) bio[it.first] = 0;
    for (auto it: susjedi[y]) bio[it.first] = 0;

    for (auto it: susjedi[x]) {
        if (maknut[it.second]) continue;
        bio[it.first]++;
    }
    for (auto it: susjedi[y]) {
        if (maknut[it.second]) continue;
        bio[it.first]++;
    }

    int vrati = -1;
    for (auto it: susjedi[x]) {
        if (!maknut[it.second] && bio[it.first] == 2) {
            if (vrati == -1) vrati = it.first;
            else return -1;
        }
    }
    return vrati;
}

bool solve (int x, int k) {
//    cout << x << ' ' << k << "\n";
    v.clear ();
    bridovi.clear ();
    cnt++;
    d[x] = 0;
    dfs (x);
//    cout << "AAAAAAAA " << v.size () << ' ' << bridovi.size () << "\n";
    if (v.size () != provc[k]) return false;
    if ((bridovi.size () / 2) != provv[k]) return false;
    if (k == 0) return true;

    int a = -1, b = -1, c = -1;
    for (auto it: bridovi) {
        int x = it.first, y = it.second;
        int z = pogle (x, y);
//        cout << x << ' ' << y << ' ' << z << "\n";
        if (z == -1) continue;

        if (d[x] > d[y]) swap (x, y);
        if (d[y] > d[z]) swap (y, z);
        if (d[x] > d[y]) swap (x, y);

//        cout << "?\n";
//        cout << w[x] << ' ' << w[y] << ' ' << w[z] <<"  " << provc[k] / 3 << ' ' << v.size () <<  "\n";
        if (w[z] == provc[k] / 3 && v.size () - w[y] == provc[k] / 3) {
//            cout << ":(\n";
            if (a != -1 && ((a != x || b != y || c != z))) return false;
            a = x;
            b = y;
            c = z;
        }
    }
    if (a == -1) return false;

    for (auto it: susjedi[a]) {
        if (it.first == b) maknut[it.second] = 1;
        if (it.first == c) maknut[it.second] = 1;
    }
    for (auto it: susjedi[b]) {
        if (it.first == c) maknut[it.second] = 1;
    }

    if (solve (a, k - 1) && solve (b, k - 1) && solve (c, k - 1)) return true;
}

int main () {
//    ios_base::sync_with_stdio (false);
//    cin.tie (0);

    cin >> n >> m;
    for (int i = 0; i < m; i++) {
        int a, b;
        cin >> a >> b;
        a--;b--;
        susjedi[a].push_back ({b, i});
        susjedi[b].push_back ({a, i});
    }
    provc[0] = 1;
    provv[0] = 0;

    for (int i = 0; i < 12; i++) {
        if (provc[i] == n && provv[i] == m) {
            kolko = i;
            break;
        }
        if (i == 11) {
            cout << "ne";
            return 0;
        }
        provc[i + 1] = provc[i] * 3;
        provv[i + 1] = provv[i] * 3 + 3;
    }


    for (int i = 0; i < n; i++) {
        if (susjedi[i].size () % 2 == 1) {
            cout << "ne";
            return 0;
        }
    }

    if (solve (0, kolko)) cout << "da";
    else cout << "ne";

    return 0;
}

詳細信息

Subtask #1:

score: 15
Accepted

Test #1:

score: 15
Accepted
time: 2ms
memory: 11620kb

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: 10712kb

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: 2ms
memory: 11208kb

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: 1ms
memory: 10148kb

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: 2ms
memory: 9500kb

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: 2ms
memory: 11000kb

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: 2ms
memory: 10468kb

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: 1ms
memory: 10036kb

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: 1ms
memory: 10612kb

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: 1ms
memory: 10972kb

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: 2ms
memory: 9736kb

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: 0ms
memory: 10960kb

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: 0ms
memory: 9604kb

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: 2ms
memory: 11360kb

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: 9876kb

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: 1ms
memory: 9892kb

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: 1ms
memory: 10576kb

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: 2ms
memory: 11248kb

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: 1ms
memory: 9676kb

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: 1ms
memory: 9976kb

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: 2ms
memory: 11544kb

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: 0ms
memory: 10548kb

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: 2ms
memory: 10976kb

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: 2ms
memory: 10912kb

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: 2ms
memory: 11028kb

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: 1ms
memory: 9564kb

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: 2ms
memory: 9748kb

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: 0ms
memory: 10128kb

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: 9448kb

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: 1ms
memory: 10060kb

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: 0ms
memory: 11236kb

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: 2ms
memory: 10840kb

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: 1ms
memory: 10820kb

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: 0ms
memory: 10556kb

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: 0
Wrong Answer

Test #35:

score: 20
Accepted
time: 2ms
memory: 11668kb

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: 2ms
memory: 9836kb

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: 2ms
memory: 9936kb

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: 1ms
memory: 9736kb

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: 0ms
memory: 11284kb

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: 2ms
memory: 10556kb

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: 2ms
memory: 10584kb

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: 2ms
memory: 11456kb

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: 2ms
memory: 11392kb

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: 0ms
memory: 10656kb

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: -20
Wrong Answer
time: 2ms
memory: 11596kb

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:

da

result:

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

Subtask #3:

score: 0
Wrong Answer

Test #69:

score: 15
Accepted
time: 127ms
memory: 19476kb

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: 117ms
memory: 19828kb

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: -15
Wrong Answer
time: 314ms
memory: 29168kb

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:

da

result:

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

Subtask #4:

score: 50
Accepted

Test #103:

score: 50
Accepted
time: 124ms
memory: 20236kb

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: 109ms
memory: 17316kb

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: 33ms
memory: 13456kb

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: 112ms
memory: 20032kb

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: 120ms
memory: 18880kb

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: 33ms
memory: 12032kb

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: 114ms
memory: 17664kb

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: 122ms
memory: 17356kb

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: 121ms
memory: 19616kb

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: 115ms
memory: 19620kb

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: 106ms
memory: 18360kb

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: 121ms
memory: 17776kb

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: 33ms
memory: 12488kb

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: 0
Accepted
time: 310ms
memory: 29044kb

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:

da

result:

ok single line: 'da'

Test #117:

score: 0
Accepted
time: 116ms
memory: 18340kb

input:

177147 265719
43304 78827
148285 95693
118314 74405
128037 28693
146086 143360
119199 114038
167957 172319
42290 19757
144409 167832
169721 86618
69271 2552
140245 25896
152923 84157
88363 2554
129029 82519
39556 123711
140857 127594
138298 169248
125870 112464
139918 71034
140992 174255
43752 10493...

output:

ne

result:

ok single line: 'ne'

Test #118:

score: 0
Accepted
time: 114ms
memory: 18908kb

input:

177147 265719
137315 52378
91468 39948
21358 137088
158661 101347
6141 172278
128352 61116
28086 128505
43463 171990
3049 98769
90250 25368
148431 91535
72441 148619
173002 101633
108646 133682
82297 21663
27784 9302
25488 146575
37726 98018
111417 156040
85533 98419
3589 73058
40099 141220
39645 69...

output:

ne

result:

ok single line: 'ne'

Test #119:

score: 0
Accepted
time: 319ms
memory: 29336kb

input:

177147 265719
76125 70576
154914 8454
166238 75512
50838 66919
62896 134371
2417 9574
117930 10103
158478 141374
14295 82676
127912 38223
51916 120873
49009 85499
141648 126121
48095 53599
23349 27737
28733 93615
28693 127053
14290 66857
155018 174476
40127 125315
21054 89557
114312 8895
125836 7055...

output:

da

result:

ok single line: 'da'

Test #120:

score: 0
Accepted
time: 128ms
memory: 18348kb

input:

177147 265719
94055 127638
173196 89184
89616 5514
139766 13955
97781 45402
160464 52654
100610 152675
144929 58980
72834 34139
119076 123167
94942 129227
126550 18028
28066 8797
141320 49133
7430 98841
52161 105055
13137 63713
155231 67180
25515 153628
58242 146627
116050 82006
3481 15303
69307 122...

output:

ne

result:

ok single line: 'ne'

Test #121:

score: 0
Accepted
time: 38ms
memory: 12484kb

input:

59049 88572
16087 20856
9010 35723
2924 44781
52425 46784
56475 44379
37974 41656
57576 16489
35099 54741
55682 32145
55586 12621
24547 24998
31767 7667
36679 293
23356 6167
28596 18760
31004 5922
8689 36754
34473 905
19421 16955
21618 14708
4738 741
25947 58590
38216 18504
13615 52657
39453 42409
2...

output:

ne

result:

ok single line: 'ne'

Test #122:

score: 0
Accepted
time: 95ms
memory: 16012kb

input:

59049 88572
8504 25976
28827 9437
7430 42527
52628 32182
22957 47612
26266 29798
38891 25961
8942 53836
3265 7036
9282 3136
9399 33573
23350 34621
44664 41616
32058 502
28477 49367
49891 52331
31981 55505
17963 54840
30865 49669
16432 14794
52910 40359
22713 42351
26687 46456
52921 721
30940 4527
34...

output:

da

result:

ok single line: 'da'

Test #123:

score: 0
Accepted
time: 316ms
memory: 29708kb

input:

177147 265719
97452 168640
174372 130861
115254 16104
131051 58262
125433 34297
118635 156415
6136 172772
158437 44414
86239 125403
89335 111239
152635 73590
143596 124351
46418 113690
169579 157327
119610 98957
97119 125612
97628 116171
97333 64567
2830 89877
38835 153256
63586 163653
31551 80769
1...

output:

da

result:

ok single line: 'da'

Test #124:

score: 0
Accepted
time: 122ms
memory: 17552kb

input:

177147 265719
3034 84183
76368 144904
112980 164298
28908 164885
121827 14177
120935 134927
41648 98875
51410 168194
64935 77284
15319 93255
47179 9906
68293 70751
84574 87225
161723 116828
46647 158558
12249 128330
51424 81268
94953 28584
132582 104034
168770 89404
151435 167196
30984 46649
103458 ...

output:

ne

result:

ok single line: 'ne'

Test #125:

score: 0
Accepted
time: 33ms
memory: 13980kb

input:

59049 88572
9929 21862
13932 30501
20382 7301
19704 19566
20612 43591
36187 4170
48873 44669
6568 35647
43078 18990
35478 43471
38324 53537
39596 15633
14169 57019
44672 24296
45494 44876
4730 17874
19450 9390
44702 53481
55220 34041
47565 52489
9974 25358
25022 32367
8517 31240
29163 53728
44501 76...

output:

ne

result:

ok single line: 'ne'

Test #126:

score: 0
Accepted
time: 34ms
memory: 13132kb

input:

59049 88572
48551 30110
6746 48862
10159 30398
1648 28715
15748 54588
11917 44986
5280 32577
7490 33570
32979 43235
19570 34215
31400 30493
14025 44170
24579 54750
55577 10903
20911 3627
37707 49229
53611 29789
40574 33085
15374 38577
35751 42071
46842 32675
23527 58852
10383 16313
16643 56579
42051...

output:

ne

result:

ok single line: 'ne'

Test #127:

score: 0
Accepted
time: 119ms
memory: 18232kb

input:

177147 265719
118650 21752
98495 68757
104858 68730
11545 98845
167243 170644
118915 158696
169594 143362
161109 101350
77701 99028
132037 12875
90102 33649
148401 31988
91698 3191
172070 65799
7082 128449
65117 64021
105856 47600
130691 84364
28690 175968
16950 123861
95161 83899
115833 75685
57933...

output:

ne

result:

ok single line: 'ne'

Test #128:

score: 0
Accepted
time: 34ms
memory: 12688kb

input:

59049 88572
12456 51661
24690 32795
58442 48811
28029 14338
28674 17495
32730 14080
46426 18677
33895 54579
46307 42981
45974 54619
35628 20783
14432 49753
51923 16241
17592 29598
24328 17028
38857 57401
50543 4338
20686 12205
15127 22047
34780 20579
58013 4217
53274 30213
27559 53420
31646 1517
321...

output:

ne

result:

ok single line: 'ne'

Test #129:

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

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 #130:

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

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 #131:

score: 0
Accepted
time: 1ms
memory: 9960kb

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 #132:

score: 0
Accepted
time: 312ms
memory: 30068kb

input:

177147 265719
104904 116239
80499 89727
67176 41237
160682 42658
132886 84821
71006 491
59372 117975
129198 153709
85677 81174
148884 169912
134221 109311
108640 56102
73755 80147
63081 22993
83131 46419
170745 79952
77082 118433
102210 153184
112586 66143
165530 103850
77597 35310
104886 170284
174...

output:

da

result:

ok single line: 'da'

Test #133:

score: 0
Accepted
time: 308ms
memory: 29684kb

input:

177147 265719
85767 85197
40769 38744
49330 27090
152815 53121
170612 75646
128976 158318
160258 86749
163289 49026
63825 150821
59165 78189
78294 129411
9802 93641
161773 16504
36854 14744
37339 176395
36571 92108
83953 149590
48303 18910
107292 173086
48934 73900
81775 2716
39439 136657
153626 163...

output:

da

result:

ok single line: 'da'

Test #134:

score: 0
Accepted
time: 313ms
memory: 29184kb

input:

177147 265719
53008 70269
133983 107114
19062 130740
69500 49957
38415 30502
42817 135554
41201 74766
66243 154996
46571 112468
64505 81675
145113 76218
55421 24784
37563 145786
36558 50453
167885 8874
38714 144699
149640 138807
153340 63397
157541 138781
7890 122860
71291 124858
40907 80423
3105 68...

output:

da

result:

ok single line: 'da'

Test #135:

score: 0
Accepted
time: 305ms
memory: 30548kb

input:

177147 265719
67684 128177
92979 13694
131492 115361
167717 45856
32699 104151
156618 68375
33938 155883
80627 48307
49319 113637
12919 35857
2806 26700
166659 11053
62968 119087
593 74689
132761 9677
135976 54649
5017 50444
43114 150847
75028 148279
118264 174295
109652 101570
127441 119656
151395 ...

output:

da

result:

ok single line: 'da'

Test #136:

score: 0
Accepted
time: 317ms
memory: 30232kb

input:

177147 265719
67440 25921
80937 110638
75286 128062
73406 152749
111208 162955
23756 85212
76181 53833
112449 140760
147742 26512
114087 105734
41655 160395
130339 42569
154805 156285
124844 45419
142037 45412
177041 161387
33540 69341
15205 119011
62925 145628
152258 146308
121395 36993
38104 8810
...

output:

da

result:

ok single line: 'da'