QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#592196#460. Colored Graph3un_larryfuncAC ✓481ms48384kbC++201.7kb2024-09-26 21:08:242024-09-26 21:08:24

详细

Test #1:

score: 100
Accepted
time: 354ms
memory: 36736kb

input:

439947
70564
261418 81226 0
391157 185738 1
291864 124280 1
224287 253065 0
254187 331805 1
93992 112583 0
3774 31281 1
413605 291199 1
123118 278877 0
383287 374927 0
219696 430048 1
374944 272292 0
156453 15904 0
13652 163529 1
291676 57172 1
268448 195409 0
242654 300684 1
174795 208807 1
216759 ...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 52
52 53
53 54
54 55
55 56
56 57...

result:

ok good job

Test #2:

score: 0
Accepted
time: 169ms
memory: 22772kb

input:

201534
54753
79776 82357 1
17465 168393 1
175136 172765 1
33056 123485 1
197761 162254 0
63240 107493 1
149708 157111 0
23785 159433 0
40582 31010 1
101080 167935 1
77008 135494 1
143778 107075 0
36915 66621 0
68633 180744 0
197407 130199 0
112353 107220 0
24838 119995 0
72209 83392 1
91205 30787 0
...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 16
16 17
17 18
18 19
19 20
20 21
21 23
23 24
24 25
25 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 50
50 51
51 52
52 54
54 55
55 56
56 57
57 58
58 59
59 60
60 61...

result:

ok good job

Test #3:

score: 0
Accepted
time: 334ms
memory: 37284kb

input:

354426
136268
265865 222759 0
218488 117037 1
214366 317008 1
283068 43310 0
224960 219265 0
278488 305278 0
85695 30793 0
122977 275840 1
9759 224066 1
179024 27540 1
61688 55383 1
109932 117608 1
57063 233008 0
33935 259467 1
161114 145837 1
32297 329485 0
214665 265256 0
61209 11040 1
334989 2039...

output:

1 4
4 5
5 6
6 7
7 8
8 9
9 15
15 16
16 17
17 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 56
56 57
57 58
58 59
59 63
63 64
64 65
65 66
66 67
67 68
6...

result:

ok good job

Test #4:

score: 0
Accepted
time: 302ms
memory: 35656kb

input:

298820
185899
118757 77429 0
277072 7651 1
66169 72410 0
193737 228102 0
177009 188031 1
254638 267553 1
70861 255978 1
14919 44401 1
114578 275391 1
36613 59461 0
24227 45159 1
187292 232824 0
214559 92720 1
264904 101337 0
19980 90087 0
229292 75231 1
102804 290264 0
41329 165936 1
88611 264278 0
...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 56...

result:

ok good job

Test #5:

score: 0
Accepted
time: 377ms
memory: 41388kb

input:

474071
158119
349811 385437 0
366109 36020 0
120999 418732 1
204988 115300 0
246548 280672 0
225102 16698 0
458930 110817 1
12421 73575 1
363996 463787 0
233888 63804 1
37293 152083 0
313301 464390 1
216755 65495 0
343845 177468 1
434492 394417 1
242602 297050 0
224831 30174 1
278805 281619 0
421923...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54...

result:

ok good job

Test #6:

score: 0
Accepted
time: 284ms
memory: 32448kb

input:

333683
68729
39682 2356 1
184738 47228 1
148521 131611 0
191363 181371 1
140080 98619 1
31466 69832 1
264372 327367 1
89283 239112 0
178358 20307 1
78978 28752 1
296758 118670 1
92583 139742 1
147435 147416 0
180736 260634 0
90008 129776 1
120628 107155 0
179034 37756 1
124939 106299 1
250116 307138...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 31
31 34
34 35
35 36
36 37
37 38
38 40
40 41
41 43
43 44
44 45
45 46
46 47
47 49
49 50
50 51
51 52
52 55
55 56
56 57
57 58
58 59
59 60
60 61
61 62...

result:

ok good job

Test #7:

score: 0
Accepted
time: 173ms
memory: 25400kb

input:

197415
70203
45737 190629 1
47739 4014 1
111360 75993 0
96633 141080 0
168241 11844 0
150049 6964 0
32236 52679 1
191391 12481 0
31595 149585 1
34558 185073 1
143922 6875 0
46453 23607 1
119209 71864 1
7962 83172 0
12972 14449 0
138460 481 1
41299 131256 0
171356 164965 0
142206 85933 0
185045 71521...

output:

1 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 40
40 41
41 42
42 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 56
56 57
57 58
5...

result:

ok good job

Test #8:

score: 0
Accepted
time: 123ms
memory: 22908kb

input:

86974
154870
25150 80619 0
21158 59157 0
10544 29439 1
4368 6414 1
14633 64081 1
16919 44434 1
62330 10396 1
46823 9654 0
77620 43285 1
67065 29448 1
72113 86889 1
23787 35113 1
85113 44741 0
39451 54492 0
72070 69888 1
50854 3619 1
62969 74158 1
44130 3505 1
68758 34137 1
7423 63164 0
53042 4979 0
...

output:

5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 52
52 53
53 54
54 55
55 56
56 58
58 59
59 60
60 61
61 ...

result:

ok good job

Test #9:

score: 0
Accepted
time: 32ms
memory: 9916kb

input:

41979
30072
16228 23667 0
10633 9446 1
2698 30407 0
28011 14395 1
16852 15173 1
20639 2587 1
25548 8868 1
17689 3463 1
14309 39782 1
24754 15558 0
5925 11612 0
6453 14971 0
19112 5956 0
14509 36483 0
37287 2197 1
20599 41910 0
4415 22038 1
22357 3642 1
1135 5898 0
207 13396 1
33064 13426 0
26055 161...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55...

result:

ok good job

Test #10:

score: 0
Accepted
time: 181ms
memory: 24356kb

input:

180618
125660
92789 174519 1
121491 25533 0
36417 75467 1
51533 175704 0
63544 69726 1
108288 125666 0
159744 50432 0
154692 91540 0
120180 146215 0
134222 118607 1
163778 15290 1
45210 154111 1
174276 17840 1
170689 120083 0
128802 73386 0
173664 116483 1
72283 105023 0
150388 67961 1
169002 138250...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 44
44 45
45 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 56
56 57
57 58
58 59...

result:

ok good job

Test #11:

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

input:

244231
13009
199430 158509 0
125328 226933 0
68200 190645 0
43874 143498 0
31152 14005 1
93304 25208 0
77577 207704 0
198393 235024 0
213644 88133 1
227885 122216 1
179818 208531 0
187776 113350 1
103520 43700 0
214553 24039 0
2935 215163 0
128234 49750 1
150526 125055 0
189255 232958 0
83659 66320 ...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54...

result:

ok good job

Test #12:

score: 0
Accepted
time: 446ms
memory: 45428kb

input:

470929
102806
400134 268291 1
430711 223608 0
231035 347766 0
319841 355009 0
144701 51708 0
15984 343436 1
124496 26056 0
322854 167577 1
176195 310119 1
241874 179160 0
313503 381632 0
122231 33419 1
368350 207353 1
151812 365689 0
59479 125276 0
129092 1372 0
160857 341089 1
349440 296964 1
30120...

output:

1 2
2 3
3 4
4 6
6 7
7 8
8 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 56
56 57
57 58
58 59
59 60
60 61
61 62
6...

result:

ok good job

Test #13:

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

input:

54128
137422
2894 44975 1
18853 42271 1
1039 32660 0
42593 26662 1
5838 43123 1
16663 48585 1
29231 39690 0
8293 7763 1
26650 33440 1
20450 24536 1
19854 18917 0
27637 17891 0
50150 35380 1
47783 43286 1
35438 14004 0
8042 1097 1
25817 4705 0
22107 24288 1
30762 24788 0
23481 53023 1
48106 34544 1
1...

output:

1 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 ...

result:

ok good job

Test #14:

score: 0
Accepted
time: 100ms
memory: 17748kb

input:

108073
43285
39407 82164 0
51675 31395 0
11410 89671 0
34160 100010 1
83286 9545 0
62177 577 0
50169 47665 0
77229 71111 1
42506 81943 1
55496 10737 1
66836 21999 1
9500 22214 1
39123 15000 1
19484 82350 0
41648 30360 0
46750 40365 1
23461 3427 1
2679 51615 1
16799 81285 0
88992 83991 0
37375 97827 ...

output:

2 3
3 4
4 5
5 6
6 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 38
38 39
39 40
40 43
43 44
44 45
45 46
46 48
48 49
49 50
50 51
51 52
52 53
53 54
54 56
56 58
58 59
59 60
60 61
61 62
6...

result:

ok good job

Test #15:

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

input:

280685
69614
195358 3310 0
85715 37572 1
205751 62114 0
121301 145608 1
78623 11734 0
245050 197876 0
168204 83753 1
129212 73788 1
195219 277783 0
135687 2686 0
163015 238759 0
123162 239934 1
160147 102559 0
14336 159696 0
9878 116234 1
125342 13454 1
191546 31568 1
43224 69679 1
30830 141338 0
13...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 51
51 52
52 53
53 54
54 56
56 57
57 58
58 59
59 60
60 61...

result:

ok good job

Test #16:

score: 0
Accepted
time: 438ms
memory: 44972kb

input:

400905
157077
205304 35838 0
277662 266239 1
227913 35918 1
38185 139904 1
216549 358219 1
237697 154807 1
129683 161310 1
363204 266317 0
270521 285344 0
381679 228043 1
20223 242515 1
167229 76384 0
125983 290186 1
357396 231384 1
134292 390829 0
3724 174975 1
172615 374534 0
207102 268482 0
28874...

output:

1 2
2 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 48
48 50
50 51
51 52
52 53
53 54
54 55
55 56
56 57
57 ...

result:

ok good job

Test #17:

score: 0
Accepted
time: 353ms
memory: 40496kb

input:

466142
150583
90906 42002 1
285568 65476 1
418891 451709 1
256195 265485 1
414056 288554 0
161060 161052 1
184296 16253 0
201601 18333 0
465776 214957 0
324952 274439 1
145591 173959 1
93294 131636 1
3124 461228 0
18880 117426 1
295604 97184 0
284265 380221 0
20619 283933 1
2017 288588 1
385407 4056...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54...

result:

ok good job

Test #18:

score: 0
Accepted
time: 383ms
memory: 40652kb

input:

409630
175548
20854 203079 0
129139 310624 0
278149 168174 0
343693 234283 0
7975 279953 0
52285 249618 0
163942 168487 0
97896 117812 1
51763 21662 1
217002 132071 0
40673 225421 1
296848 331023 1
236314 231554 0
163010 226035 0
97591 134427 0
79706 345502 1
390723 226790 0
121980 98796 0
297343 38...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 20
20 21
21 22
22 23
23 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 57
57 58
58 59...

result:

ok good job

Test #19:

score: 0
Accepted
time: 376ms
memory: 41200kb

input:

408285
130656
407660 737 1
161217 314407 0
158245 29745 0
278877 160951 1
130157 92614 1
283767 249746 1
125759 104732 0
303581 241421 1
405197 397736 1
293024 321670 1
179917 296212 0
382924 285841 0
123827 116066 0
44125 370843 1
388185 401958 1
332205 275448 0
303965 165971 0
345243 283220 1
2651...

output:

1 2
2 3
3 4
4 5
5 6
6 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 55
55 56
56 57
57 58
58 ...

result:

ok good job

Test #20:

score: 0
Accepted
time: 243ms
memory: 31024kb

input:

294436
111883
100587 123775 1
87137 113576 1
127660 11574 1
201971 160376 0
55831 76794 0
80387 104914 1
182353 4266 1
69718 248924 0
219863 159885 1
4303 15869 1
289119 1924 0
215113 29734 1
247607 274315 0
35045 239008 1
54708 180088 1
3693 123251 0
79269 132474 1
19641 253725 0
50536 73787 0
1817...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55...

result:

ok good job

Test #21:

score: 0
Accepted
time: 86ms
memory: 15752kb

input:

59681
104265
3512 49062 1
112 10744 1
6913 28295 1
9005 55930 1
41956 34689 0
25085 46081 0
30980 4045 1
14111 15040 0
9301 11268 1
16414 57443 1
48952 38105 1
33986 22078 0
22637 31781 0
24115 57267 1
762 29022 0
32653 17582 1
46971 23605 1
47689 521 0
1377 46028 1
28852 28067 1
20153 17881 1
19018...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 14
14 15
15 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 56
56 57
57 58
58 59...

result:

ok good job

Test #22:

score: 0
Accepted
time: 277ms
memory: 31364kb

input:

423559
10927
10164 112320 0
186204 415928 1
39986 53363 0
193483 295369 0
346630 177448 1
89436 298580 1
228744 316473 0
305904 97710 1
393797 380235 1
227809 365192 0
332919 386416 0
170772 409774 0
385204 249501 0
109630 268969 1
158942 401530 0
87460 235766 0
25388 64804 1
116631 161936 1
164645 ...

output:

2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 56
56 ...

result:

ok good job

Test #23:

score: 0
Accepted
time: 69ms
memory: 13084kb

input:

104240
10875
66165 5338 0
20058 49792 0
86437 78767 1
71651 34321 1
101556 61595 0
16126 78216 1
37128 50451 1
84096 69932 1
53387 66985 1
86425 5467 1
5152 44006 1
88272 75805 1
95816 85478 0
44301 57818 0
91772 46688 1
39407 81852 0
18153 56197 0
51076 76610 0
61512 70448 1
76079 84184 1
15325 263...

output:

3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 40
40 41
41 42
42 43
43 44
44 46
46 47
47 50
50 51
51 52
52 53
53 54
54 55
55 56
56 57
57 58
58 59
5...

result:

ok good job

Test #24:

score: 0
Accepted
time: 200ms
memory: 25768kb

input:

233899
84915
161724 139733 1
207114 190059 1
137040 201772 0
72562 69395 1
136757 40482 1
171678 79499 1
72911 230600 0
104011 159930 0
128615 161141 0
133745 186517 1
24108 73826 0
197913 210301 1
145942 55478 1
207447 100313 0
2520 121892 0
90396 221263 1
194447 160361 1
226858 60225 0
49975 21225...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 56...

result:

ok good job

Test #25:

score: 0
Accepted
time: 250ms
memory: 28756kb

input:

363065
29322
360301 112809 1
33373 6808 1
329411 125991 1
161039 146357 1
306273 114394 1
34084 220039 1
127870 293942 0
211063 267772 1
15372 348213 0
301995 81627 0
357135 47587 0
306866 311060 1
350737 154774 1
357712 231575 0
337139 356474 1
100936 84148 0
261673 81191 0
191440 306358 0
75342 36...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 36
36 37
37 38
38 39
39 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 56...

result:

ok good job

Test #26:

score: 0
Accepted
time: 143ms
memory: 18688kb

input:

212640
20160
62439 48063 0
71001 108802 1
140055 77868 0
136698 194368 0
19594 205201 0
200073 2403 1
157960 35862 0
99570 144020 1
83505 134130 0
96670 159074 0
114562 50096 0
79619 25076 1
43487 79190 0
98293 5837 0
73236 28868 0
208132 25800 0
137484 16464 0
108472 30623 1
24462 175194 1
14425 11...

output:

1 2
2 3
3 4
4 5
5 6
6 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 56
56 ...

result:

ok good job

Test #27:

score: 0
Accepted
time: 438ms
memory: 45516kb

input:

450469
172967
84838 192594 1
325973 56101 0
276252 396038 1
224394 394475 1
39395 134735 1
422544 151665 1
390847 146631 0
88519 244330 0
310710 376367 0
178010 194239 0
64051 335621 1
420942 344288 0
365095 129916 1
239109 325280 1
83644 255465 1
112585 103841 1
179736 10088 1
391456 197443 0
15765...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 40
40 41
41 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 56
56 57...

result:

ok good job

Test #28:

score: 0
Accepted
time: 349ms
memory: 39300kb

input:

314041
164247
268913 194625 0
183865 27431 0
8921 108423 1
299150 129787 0
89404 72818 0
258188 288716 1
289989 103531 0
179661 129149 0
161220 224982 1
169661 232513 1
78241 292125 0
155664 273690 0
262496 198026 1
120002 272903 0
66643 205167 0
82470 37160 1
221031 165414 1
38613 300449 0
25806 79...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 14
14 15
15 16
16 23
23 24
24 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 45
45 46
46 47
47 49
49 50
50 51
51 52
52 53
53 55
55 56
56 57
57 59
59 62
62 63
63 64
64 65
65 66
66 67
67 71
71 72
72 73
73 74...

result:

ok good job

Test #29:

score: 0
Accepted
time: 67ms
memory: 15872kb

input:

16580
145441
10070 15187 1
2771 13593 1
8792 4106 1
7961 3608 0
11452 14863 1
15225 13321 0
10673 1359 1
8396 2504 0
15673 2468 1
7994 12770 1
15930 9326 0
4845 8677 0
9079 2231 0
14201 14701 0
13544 15419 0
8422 9781 0
12334 12845 0
6656 6704 1
7287 8642 0
12519 9348 0
216 6979 0
6749 12275 0
14483...

output:

1 2
2 3
3 4
4 5
5 6
6 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 59
5...

result:

ok good job

Test #30:

score: 0
Accepted
time: 180ms
memory: 25940kb

input:

238853
63689
106979 63449 1
167509 50334 1
194191 127842 1
94705 21884 1
234274 98223 1
222053 102810 1
148219 147087 1
72805 225057 1
80987 129025 0
4657 39672 0
94759 97490 1
166056 115876 0
157767 77824 1
101641 100445 1
106599 154292 1
96150 36608 1
137504 88795 1
52441 42241 1
33553 121707 0
88...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 44
44 45
45 46
46 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 57
57 58
58 59
59 60...

result:

ok good job

Test #31:

score: 0
Accepted
time: 353ms
memory: 39944kb

input:

344930
141458
178912 244689 1
72144 292799 0
19780 101253 0
56829 3927 1
141438 329350 0
275546 238242 0
115573 160709 0
251957 80381 0
163345 236177 0
70778 192859 0
178965 207463 0
41073 165984 0
4115 286785 1
138176 91818 1
236773 112091 1
26782 330022 1
108430 338612 1
271116 30578 0
264762 1307...

output:

1 2
2 3
3 4
4 5
5 6
6 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 43
43 44
44 46
46 47
47 49
49 50
50 51
51 52
52 53
53 54
54 55
55 56
56 57
57 58
58 59
59 ...

result:

ok good job

Test #32:

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

input:

334071
44384
12239 149743 1
107580 174766 0
148888 139788 1
296856 307109 0
242754 246243 0
232134 21776 1
304707 162324 1
13567 6162 1
226764 328559 1
117061 143605 0
202994 265592 0
70483 228099 0
277132 213606 0
74194 244620 1
264019 145144 0
281521 123212 1
26697 130571 1
236460 156745 1
161829 ...

output:

1 2
2 4
4 5
5 6
6 7
7 8
8 9
9 10
10 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 38
38 39
39 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 56
56 57
57 58
58 59
59 ...

result:

ok good job

Test #33:

score: 0
Accepted
time: 392ms
memory: 42040kb

input:

485563
135018
154831 68457 0
179569 118881 1
40660 48223 0
223449 64431 0
266419 446099 0
44667 462579 1
224520 252834 0
319612 223089 0
157434 105844 1
62370 157629 0
190572 241505 0
269107 42764 1
195325 450073 1
58349 24858 0
66120 98897 1
5337 5714 1
471983 319917 1
70191 203029 1
381527 261807 ...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55...

result:

ok good job

Test #34:

score: 0
Accepted
time: 289ms
memory: 32888kb

input:

452063
2426
175766 138342 1
123118 48168 1
433034 6745 0
372001 115087 0
338984 319395 1
207731 423719 0
244115 223715 0
75482 33401 0
415969 435430 1
365960 149613 1
389324 406645 1
371962 384391 1
324494 398273 0
70911 353536 0
199112 243081 0
122130 164059 0
381242 94433 0
20271 76861 0
324491 15...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 12
12 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 56...

result:

ok good job

Test #35:

score: 0
Accepted
time: 145ms
memory: 22412kb

input:

102709
184140
44778 75680 0
3465 38301 1
84510 73870 1
54816 82688 1
28537 5666 1
9916 85498 0
86988 70926 0
21981 82415 0
18263 81253 1
64969 53326 0
41622 6278 0
52828 54607 1
18260 2515 0
20903 82850 0
46945 13798 0
67636 75922 1
68303 28081 0
4468 67149 0
26634 2019 1
89255 12119 1
14 81403 1
12...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54...

result:

ok good job

Test #36:

score: 0
Accepted
time: 155ms
memory: 22136kb

input:

95845
171908
87425 84732 0
9050 29495 1
73387 17227 0
5541 94147 1
61322 54295 0
92599 43905 0
44595 31418 0
40153 21257 0
54530 87893 1
53545 38501 0
24796 23985 0
35688 69611 1
53983 55696 1
2370 56810 0
90465 38780 1
91986 31056 0
84520 78371 0
23217 70357 1
50950 69828 0
69635 89649 0
42954 7958...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 56
56 57
57 58...

result:

ok good job

Test #37:

score: 0
Accepted
time: 194ms
memory: 25172kb

input:

209182
147312
180974 209098 1
170281 26495 1
79877 55987 1
114802 180556 0
125416 41540 0
45080 103263 1
19443 41419 1
109330 73045 1
87651 89376 0
136463 179677 0
12283 28332 1
100068 74506 1
92881 119527 1
38807 135834 1
74955 72348 1
196074 100420 0
106409 128546 1
37225 22516 0
208120 198638 0
1...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54...

result:

ok good job

Test #38:

score: 0
Accepted
time: 251ms
memory: 30448kb

input:

252168
93869
211707 121616 1
66610 65548 1
32139 244141 1
180996 55397 0
26423 154104 0
214353 198904 0
87786 131478 0
44835 8056 1
94275 136950 1
147912 234472 1
43368 234456 1
59628 169353 1
224395 130735 0
137314 211444 0
231840 122056 1
49875 65880 1
6679 100826 1
203616 164844 0
91836 144840 0
...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 56
56 57...

result:

ok good job

Test #39:

score: 0
Accepted
time: 87ms
memory: 15600kb

input:

60998
93640
7920 5993 1
56057 45923 0
801 2304 1
51254 58268 0
34791 32143 1
52478 2618 1
25238 51865 0
5220 250 1
11846 4409 0
7373 25397 0
21830 19243 1
13717 18104 1
53428 29946 1
31458 34134 1
1421 13702 1
10162 38434 1
36493 27605 0
38796 12540 1
44492 13244 1
29012 10372 0
54348 26154 1
24101 ...

output:

1 2
2 3
3 4
4 5
5 6
6 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 20
20 21
21 22
22 23
23 24
24 25
25 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 40
40 41
41 42
42 44
44 45
45 46
46 49
49 50
50 51
51 52
52 53
53 57
57 58
58 59
59 60
60 61
61 62
62 63
63 64
64 65
65 66
66 72
72 73
7...

result:

ok good job

Test #40:

score: 0
Accepted
time: 233ms
memory: 27760kb

input:

228750
143271
60686 89389 0
87772 77455 1
71242 208477 0
125209 148990 1
21519 174352 0
199594 125232 1
217669 84951 0
132926 92948 0
18361 177732 0
195868 297 1
225171 227575 0
32227 78070 1
204409 66332 0
2899 53048 0
86060 77580 1
191939 155874 0
22234 224352 0
155847 87242 0
110950 90336 0
21632...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 56
56 57
57 58...

result:

ok good job

Test #41:

score: 0
Accepted
time: 234ms
memory: 29892kb

input:

283465
55488
281782 40243 1
119115 208533 1
167996 40016 0
155031 30431 1
98300 89548 0
23376 100669 0
162376 206888 1
3308 120863 1
165474 233311 0
51828 154437 0
75353 147689 1
33573 173881 0
83159 125412 1
134073 30764 1
184917 169901 1
207899 223555 0
121347 161286 0
137744 236153 0
14594 108231...

output:

3 4
4 5
5 6
6 7
7 9
9 10
10 11
11 12
12 13
13 14
14 15
15 17
17 21
21 22
22 23
23 24
24 25
25 28
28 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 56
56 57
57 58
58 59
59 60
60 63
63 64
64 65
65 66
66 68
68 71...

result:

ok good job

Test #42:

score: 0
Accepted
time: 232ms
memory: 28608kb

input:

267939
67394
17875 11207 1
260781 16033 0
242089 228226 1
109927 15556 1
55277 124542 1
89031 72801 1
3049 129395 1
128589 132698 0
42896 95365 1
165743 62679 1
186403 226539 1
75660 47470 1
238051 13843 1
112581 99357 0
97659 84542 1
50634 131311 0
173361 124609 1
76307 13327 0
109412 227143 0
4445...

output:

1 2
2 4
4 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 15
15 16
16 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 33
33 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 44
44 45
45 46
46 47
47 48
48 52
52 53
53 54
54 55
55 56
56 58
58 59
59 60
60 61
61 62
62 63
63 64
64 65
65 66
6...

result:

ok good job

Test #43:

score: 0
Accepted
time: 207ms
memory: 25772kb

input:

301593
36812
194959 79442 1
235638 200163 0
20167 196084 1
52303 12218 1
22843 299439 1
189714 94621 1
233364 289559 0
55620 89069 1
124058 12928 1
15095 145974 0
58973 202335 0
205691 27428 0
210863 144588 1
148035 77864 1
90287 18616 1
86275 53533 1
218498 48627 1
77079 260794 1
91150 86959 1
1006...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55...

result:

ok good job

Test #44:

score: 0
Accepted
time: 309ms
memory: 34752kb

input:

341414
152611
105323 115946 0
28649 312684 1
13409 52595 1
328738 172982 0
284481 195609 1
37033 45192 0
95161 314518 0
10719 115270 0
232169 250222 1
252860 189891 1
85027 287699 1
337397 33193 0
56222 265745 1
263770 302362 1
55872 15264 0
107271 175454 1
291696 81403 1
17459 93378 1
249708 72525 ...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55...

result:

ok good job

Test #45:

score: 0
Accepted
time: 232ms
memory: 30104kb

input:

170456
183149
156827 158081 0
122193 146466 0
26101 22781 1
162470 16428 0
5595 26108 0
111318 118232 1
139525 145583 0
77905 19264 0
91516 94748 0
80064 166236 1
61042 34355 1
95327 93003 0
131995 106445 0
127812 148379 1
21943 74580 0
9116 16086 0
17180 66129 0
118042 35591 1
10534 76998 0
167406 ...

output:

7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 56
56 57
57 58
58 59
59 60
60 61
61 62
62 63...

result:

ok good job

Test #46:

score: 0
Accepted
time: 447ms
memory: 46932kb

input:

479995
119567
143387 230692 0
170618 452482 1
17643 324752 1
273497 168318 0
51924 399252 0
393082 354653 1
456662 152609 0
468556 450599 0
44033 47875 1
444715 53794 1
401652 415499 0
183459 43264 1
354539 141694 1
326784 305916 1
141684 9853 1
471957 407365 1
90704 19595 1
142049 46914 0
254513 26...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 56
56 57
57 58
58 59...

result:

ok good job

Test #47:

score: 0
Accepted
time: 338ms
memory: 37732kb

input:

499483
90531
380186 409022 0
411919 27295 0
354353 67645 0
463087 44321 1
253004 318113 1
40418 228682 1
196156 435112 1
113086 49969 0
25086 251275 1
137340 306124 1
355445 322752 0
360239 147571 0
165263 381351 0
287620 11040 0
128433 276597 0
160842 229069 0
68863 487783 0
89464 454715 0
36922 46...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55...

result:

ok good job

Test #48:

score: 0
Accepted
time: 481ms
memory: 48384kb

input:

428878
197216
135088 159204 0
189729 358807 0
33410 19942 1
201894 132584 1
237035 378087 0
415621 304783 0
330713 151587 0
207480 298995 0
223565 59762 1
212656 229486 0
385799 216418 1
326762 332608 0
362304 313364 0
344788 86714 1
378046 162523 1
35491 109058 1
237834 294419 1
421930 309325 0
118...

output:

1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 56
56 57
57 58
58 59
59 60
60 61
61 62...

result:

ok good job

Test #49:

score: 0
Accepted
time: 162ms
memory: 24552kb

input:

101757
150182
80660 5705 1
2072 70366 0
75095 39230 1
19474 1521 1
79785 60738 0
42018 17702 0
91960 12817 0
95483 56235 0
11265 79133 1
38465 14710 0
37092 40426 1
64659 16853 1
89369 76940 0
98267 91535 0
68300 5868 1
28294 22878 1
95836 99970 0
69592 100346 1
85583 9586 1
96204 71425 1
67697 2603...

output:

1 3
3 4
4 5
5 6
6 7
7 8
8 13
13 14
14 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
52 53
53 54
54 55
55 56
56 57
57 58
58 59
59 60
60 61
61 62
6...

result:

ok good job

Test #50:

score: 0
Accepted
time: 270ms
memory: 33240kb

input:

248945
134503
105559 112127 1
118413 847 0
89872 71996 0
65524 141689 0
143727 228693 1
201271 37490 0
170221 74917 0
191107 190073 1
162142 204246 1
189346 196116 1
42831 85711 1
4420 17809 1
97092 213235 0
134937 41026 1
161121 136379 1
223418 217145 1
101268 72348 1
8148 121248 1
247065 211736 0
...

output:

1 2
2 3
3 7
7 8
8 9
9 11
11 14
14 15
15 16
16 17
17 19
19 20
20 21
21 22
22 23
23 24
24 25
25 30
30 31
31 32
32 33
33 34
34 36
36 37
37 38
38 39
39 40
40 41
41 42
42 44
44 47
47 48
48 49
49 50
50 52
52 54
54 55
55 56
56 57
57 58
58 60
60 61
61 62
62 63
63 64
64 65
65 66
66 67
67 68
68 69
69 71
71 72...

result:

ok good job