QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#524974#2744. WerewolfJasonwei#100 ✓501ms186564kbC++172.8kb2024-08-20 11:13:192024-08-20 11:13:19

詳細信息

Subtask #1:

score: 7
Accepted

Test #1:

score: 7
Accepted
time: 4ms
memory: 85284kb

input:

100 200 100
11 23
5 9
2 88
19 18
78 90
90 52
25 30
52 71
35 43
39 29
62 17
69 49
26 82
84 83
38 87
70 19
73 57
1 97
39 95
86 70
99 82
73 17
62 96
69 53
92 91
58 42
43 34
16 76
83 35
45 94
0 52
75 14
6 35
42 5
25 60
32 44
91 63
33 46
80 68
87 30
84 32
24 25
18 56
40 11
17 12
2 18
88 28
96 42
38 70
8 ...

output:

1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1

result:

ok 100 numbers

Test #2:

score: 7
Accepted
time: 7ms
memory: 77808kb

input:

100 99 100
69 88
29 91
33 24
11 40
49 11
1 5
73 11
99 19
71 82
28 55
44 14
85 99
67 96
39 89
31 29
39 20
53 72
97 49
24 23
81 37
45 27
58 81
44 76
66 85
15 68
1 12
27 8
28 48
33 61
55 56
84 68
62 91
44 7
74 65
3 86
78 60
79 7
35 72
0 52
21 26
4 44
34 76
56 43
78 32
13 45
75 47
92 30
18 2
1 89
75 26
...

output:

1
1
1
0
0
0
1
1
1
1
1
1
1
0
1
1
1
1
0
1
0
1
1
0
1
1
1
0
0
1
1
0
1
0
0
1
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
0
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
0
1
0
1
0
1
1
0
1
1
1
1
1
0
1
1

result:

ok 100 numbers

Test #3:

score: 7
Accepted
time: 12ms
memory: 77104kb

input:

21 200 100
18 1
0 9
17 8
4 9
15 14
0 15
2 8
15 20
14 1
3 6
7 1
5 13
12 3
5 1
2 7
3 19
4 20
12 8
12 15
0 14
7 15
20 16
11 1
11 8
11 5
14 8
15 1
11 4
18 17
13 18
10 0
14 19
19 2
16 8
15 18
15 17
9 14
11 20
9 20
9 15
9 17
11 0
4 12
17 11
16 6
20 1
20 12
8 5
13 9
18 9
19 16
13 2
18 11
7 12
18 14
7 19
8 ...

output:

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1

result:

ok 100 numbers

Test #4:

score: 7
Accepted
time: 8ms
memory: 79524kb

input:

7 8 100
0 5
5 6
2 5
1 5
1 4
5 3
3 1
0 1
1 4 1 5
2 0 1 5
4 2 1 6
5 2 2 4
3 6 2 6
0 6 0 6
0 4 0 4
3 4 2 6
1 6 0 6
0 1 0 5
2 5 2 5
6 2 2 2
0 6 0 6
2 1 2 6
4 0 1 4
3 4 3 5
2 6 1 6
1 0 0 4
4 1 4 5
6 2 2 2
2 5 2 6
2 6 1 6
1 5 1 6
4 0 1 3
6 3 2 3
0 5 0 6
5 3 3 3
2 3 2 5
4 5 0 6
1 4 1 5
2 6 0 6
2 4 0 4
0 5 ...

output:

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1

result:

ok 100 numbers

Test #5:

score: 7
Accepted
time: 12ms
memory: 76888kb

input:

100 110 100
78 34
93 78
85 11
12 65
55 96
92 88
80 91
58 38
44 85
15 46
9 55
84 70
47 65
82 71
37 25
81 71
23 2
57 35
75 8
14 47
85 53
40 82
99 25
22 97
39 79
45 62
69 59
48 62
56 32
60 19
17 55
31 5
52 23
7 59
56 64
96 87
35 84
45 94
31 18
61 64
30 72
21 59
96 85
96 68
91 41
82 53
7 65
4 24
51 99
1...

output:

0
1
1
1
1
1
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
0
1
0
0
0
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
0
1
0
1
0
1
1
1
1
1
1
0

result:

ok 100 numbers

Test #6:

score: 7
Accepted
time: 12ms
memory: 77016kb

input:

100 130 100
72 65
15 55
40 30
11 74
92 10
52 17
12 30
92 14
31 43
35 54
20 14
16 10
17 89
50 24
75 95
7 89
10 3
80 33
11 8
81 59
63 49
17 51
57 29
53 77
76 28
85 31
28 3
83 38
66 40
21 4
10 60
71 62
68 12
56 6
75 89
80 10
37 23
92 97
9 44
9 27
33 23
0 77
8 24
35 61
1 21
7 70
57 85
72 54
15 66
92 80
...

output:

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
1
0
1
0
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
0
0
1
1
1
1
0
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
1
0
1
1
1
1
0
1
1
1
1
1

result:

ok 100 numbers

Test #7:

score: 7
Accepted
time: 7ms
memory: 76600kb

input:

100 120 100
22 87
67 95
63 62
90 0
68 75
24 83
16 72
61 1
31 68
2 41
92 85
13 34
41 33
29 3
30 78
35 9
8 34
71 36
93 59
67 17
74 99
44 40
55 12
80 86
43 37
2 48
11 32
82 3
21 25
25 12
30 92
77 43
44 32
72 70
0 69
95 31
55 52
58 56
45 47
8 3
85 54
70 71
49 76
33 99
15 38
49 29
66 7
38 40
55 27
65 4
9...

output:

0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
0
1
0
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
0
0
1
1
1
1
0
1
1
1
1
0
1
1
0
0
1
1
1
1
1
1
1
1
0
1
1
1

result:

ok 100 numbers

Test #8:

score: 7
Accepted
time: 13ms
memory: 94176kb

input:

100 99 100
28 9
88 21
60 81
5 15
75 1
57 63
11 41
11 25
68 37
63 39
38 39
61 78
91 74
10 98
32 10
7 95
4 22
49 56
45 30
4 88
59 33
20 51
2 25
27 86
59 40
76 78
23 58
99 66
14 80
3 89
72 12
47 18
65 49
71 98
62 90
51 83
8 93
70 44
35 67
13 97
46 40
21 38
16 52
23 37
66 96
26 8
64 77
48 41
0 89
96 26
...

output:

1
1
0
1
0
0
1
1
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
1
0
0
1
0
1
0
1
0
1
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
1
0
0
0
1
1
0
0
0
0
0
0
0
0
0
1
0
0
1
1
0
1
1
0
0
0
1
1
0
1
1
0
0
1
1
0
0
1
0
0
0
1
1
1
0
0
1
0
0
0

result:

ok 100 numbers

Test #9:

score: 7
Accepted
time: 12ms
memory: 90772kb

input:

100 110 100
41 61
0 6
13 70
24 82
31 87
43 63
0 3
38 10
92 23
84 73
17 1
37 99
89 30
19 80
69 3
4 8
9 49
93 18
24 10
21 36
38 44
0 1
94 57
77 98
18 96
29 11
7 1
5 78
66 36
16 21
79 67
22 39
3 10
40 54
19 37
28 5
12 67
13 16
13 19
46 9
30 29
8 26
7 59
91 59
4 48
2 50
67 73
14 56
13 1
9 90
15 7
51 16
...

output:

1
1
1
1
1
1
1
0
1
1
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
0
0
1
1
1

result:

ok 100 numbers

Subtask #2:

score: 8
Accepted

Dependency #1:

100%
Accepted

Test #10:

score: 8
Accepted
time: 11ms
memory: 91704kb

input:

3000 3300 3000
155 1238
2134 2071
979 2819
1920 2593
2493 2966
967 639
2107 2424
981 1846
738 873
2613 1769
2697 118
2865 2855
1676 1939
205 1721
11 1745
2862 2248
1110 518
1038 2390
792 1879
2549 396
641 975
1676 695
1485 577
1048 2682
1398 2832
1754 1571
642 2288
1436 2835
2534 2318
581 1978
2860 ...

output:

1
1
1
1
1
1
1
0
1
1
0
1
1
1
1
0
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
0
0
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
0
0
0
1
1
...

result:

ok 3000 numbers

Test #11:

score: 8
Accepted
time: 12ms
memory: 77088kb

input:

3000 2999 3000
430 272
49 929
1648 1738
1366 2195
620 1833
382 1795
2349 2092
1376 396
1080 2896
2515 2988
1784 2847
419 2760
2815 646
206 2052
915 2928
1799 1541
1222 2030
2419 1245
941 1388
1197 1931
1455 45
1484 1115
847 1368
985 64
540 2220
1871 606
1101 673
2457 2896
1051 123
2967 1920
1682 170...

output:

1
0
1
0
1
1
1
0
1
0
0
1
0
1
0
0
1
1
1
0
0
1
1
1
1
1
1
1
1
1
0
0
0
1
0
0
0
1
1
0
1
0
0
1
0
1
1
0
0
1
0
1
1
0
1
0
1
1
0
1
0
1
0
1
1
1
1
1
1
1
1
0
0
1
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
0
0
1
1
1
0
0
1
0
1
1
1
1
0
1
1
1
0
0
1
0
1
0
1
0
1
1
0
1
0
1
1
0
1
0
1
1
0
1
0
1
1
1
0
0
0
0
0
1
0
0
1
1
1
1
1
1
...

result:

ok 3000 numbers

Test #12:

score: 8
Accepted
time: 3ms
memory: 79468kb

input:

3000 2999 3000
689 1178
1290 846
344 267
2963 1661
328 1804
2387 2913
349 232
384 337
2030 2643
2851 2242
188 1078
573 1185
1048 1711
1786 2418
410 1898
1124 2282
1419 2195
516 1963
83 2979
2191 2341
488 335
2644 547
1045 2034
2496 1244
627 2955
864 795
560 1560
816 2615
519 378
645 2707
1696 1364
2...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

ok 3000 numbers

Test #13:

score: 8
Accepted
time: 12ms
memory: 79044kb

input:

3000 3300 3000
1918 305
1536 675
1997 764
263 2124
32 1776
698 71
1113 788
101 86
2007 2795
1153 2572
464 632
2268 2133
1267 842
1113 1723
41 210
1063 2733
907 1960
1350 1426
1731 1895
560 495
220 471
102 515
1305 1355
726 634
670 1343
1796 2678
1276 1187
2038 1677
1112 433
1467 2320
67 53
252 788
2...

output:

0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
1
0
0
0
1
1
1
1
1
1
0
1
1
1
1
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
...

result:

ok 3000 numbers

Test #14:

score: 8
Accepted
time: 7ms
memory: 65648kb

input:

3000 2999 3000
1753 2871
112 569
1259 394
1550 2748
1615 1031
382 830
713 1435
605 267
384 1437
633 1111
1223 26
506 320
586 131
702 2189
27 79
821 1877
2588 2937
2420 2062
2040 1476
1551 1538
1967 616
457 2481
436 2001
298 807
2264 1465
435 1101
1864 1579
862 1331
342 5
1495 1749
674 1471
1228 1214...

output:

1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
...

result:

ok 3000 numbers

Test #15:

score: 8
Accepted
time: 11ms
memory: 65440kb

input:

3000 6000 3000
1399 725
1595 179
1728 387
1775 1135
2679 2493
1207 356
850 1324
2349 1588
2257 1713
754 2056
2651 2437
1890 2866
997 2631
552 2994
1182 490
22 2046
814 192
1862 2472
2320 917
2807 1327
1240 2450
309 1797
2638 2127
312 352
552 1674
1950 1746
1488 1402
1018 463
1106 2808
2432 2756
2533...

output:

0
0
1
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
...

result:

ok 3000 numbers

Subtask #3:

score: 34
Accepted

Test #16:

score: 34
Accepted
time: 346ms
memory: 171432kb

input:

199998 199997 200000
156420 49950
49336 22370
148090 141451
185151 70518
45372 65839
2998 189479
99170 146949
110684 156207
28346 46533
193782 24138
46001 10975
12619 195136
88630 187635
23105 65382
119494 191355
70047 182323
47837 131580
63544 9529
73072 41503
141680 118088
3091 2117
138076 49422
6...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

ok 200000 numbers

Test #17:

score: 34
Accepted
time: 386ms
memory: 174980kb

input:

200000 199999 200000
98705 98702
58551 58560
116194 116204
55426 55423
105075 105076
59747 59749
75300 75321
6328 6334
192185 192171
90268 90259
184943 184958
97149 97120
140022 140023
81222 81229
90981 90980
44746 44741
47044 47045
137071 137070
181640 181647
149380 149367
177961 177948
164158 1641...

output:

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

result:

ok 200000 numbers

Test #18:

score: 34
Accepted
time: 367ms
memory: 175436kb

input:

200000 199999 200000
77843 77812
176713 176928
136579 136265
170137 170105
130251 130164
118094 118131
18322 18278
161608 161339
81900 81802
90856 90774
193007 193229
18185 18115
63323 63257
173757 173726
73447 73592
117913 117984
146651 146733
45633 45563
19011 19128
96145 96063
61069 60984
91421 9...

output:

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

result:

ok 200000 numbers

Test #19:

score: 34
Accepted
time: 318ms
memory: 175132kb

input:

200000 199999 200000
34944 38955
93031 94477
35940 35559
53225 48633
130489 130840
190539 189901
75939 74774
79465 80862
22706 18009
50988 50885
119771 121872
75532 78483
179476 175700
84921 84893
146532 145640
34844 35805
17528 19378
113468 107785
124582 121155
101464 105292
71573 69542
178720 1874...

output:

1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
...

result:

ok 200000 numbers

Test #20:

score: 34
Accepted
time: 344ms
memory: 175008kb

input:

200000 199999 200000
192172 199828
96430 94399
110800 107398
15955 22337
147057 152728
9787 7427
159913 160321
54241 44984
81215 78749
176950 176385
49526 39175
61488 58809
84665 93310
170651 172558
117375 127367
181218 179167
58857 68376
81461 68558
158944 161191
164989 155906
27124 23122
98173 972...

output:

0
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
0
0
1
1
0
0
1
0
0
0
1
0
1
1
1
0
1
1
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
1
1
1
1
...

result:

ok 200000 numbers

Test #21:

score: 34
Accepted
time: 303ms
memory: 174504kb

input:

200000 199999 200000
6677 44642
25773 42580
120687 161462
190929 137197
71602 67829
120926 147588
186460 60330
30125 19383
120584 37591
73823 103116
28691 23659
77313 85059
40646 65621
78901 96772
76581 76109
115261 115666
32232 48664
173336 136822
192627 191485
165968 169969
171516 190758
88102 743...

output:

0
1
0
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
0
1
0
0
1
0
0
0
1
0
0
0
1
0
0
1
0
0
0
1
0
0
0
1
0
0
1
1
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
1
1
0
1
1
1
0
1
0
0
0
0
0
1
1
1
1
0
1
1
1
0
0
1
1
1
1
1
0
1
1
1
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
1
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
...

result:

ok 200000 numbers

Test #22:

score: 34
Accepted
time: 291ms
memory: 174696kb

input:

200000 199999 200000
169218 10502
165141 100773
160882 56876
105553 152590
93090 77410
187049 13839
95923 186409
52294 970
40029 36077
177537 62542
134663 13927
36445 146033
114176 19872
98816 50811
79794 75696
1928 146314
162873 143873
141582 93663
31100 130364
24756 191302
128820 151970
25138 1243...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
...

result:

ok 200000 numbers

Test #23:

score: 34
Accepted
time: 370ms
memory: 179920kb

input:

200000 199999 200000
53787 53790
187849 187835
146402 146389
84240 84238
159037 159032
177808 177806
155250 155237
14877 14875
175723 175724
130564 130590
23091 23087
103769 103778
114642 114647
171121 171128
40671 40666
12134 12124
19400 19401
109993 109978
109853 109803
175600 175596
128377 128372...

output:

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

result:

ok 200000 numbers

Test #24:

score: 34
Accepted
time: 241ms
memory: 176188kb

input:

200000 199999 200000
128305 128176
181450 181208
194096 194170
52639 52618
80157 80113
97386 97374
16414 16456
158521 158369
34092 34153
43703 43737
23507 23492
193355 193424
89956 89622
60024 60154
119480 119463
136666 136796
193892 193984
118853 118716
166202 166224
16662 16750
186367 186016
16978...

output:

1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
...

result:

ok 200000 numbers

Test #25:

score: 34
Accepted
time: 240ms
memory: 174008kb

input:

200000 199999 200000
89028 91515
140242 140737
51317 51431
18287 21581
150690 143353
26524 27999
160444 160610
173061 175687
23912 16417
128946 123374
22836 25444
14098 12601
185998 184297
101875 101963
125608 136632
172022 169191
18400 18197
40076 43418
18917 21534
17187 16325
163920 163701
64494 6...

output:

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
0
1
0
1
0
1
1
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0
0
1
1
1
1
1
0
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

result:

ok 200000 numbers

Test #26:

score: 34
Accepted
time: 229ms
memory: 175256kb

input:

200000 199999 200000
158570 154500
43762 47690
156058 158459
24738 19635
25889 14571
100603 101499
48111 54392
165976 164853
35586 42881
16270 18655
39311 46500
155188 148246
98803 87448
95951 98602
145693 147258
92388 92377
140408 140188
18198 23187
186868 190478
50808 57929
63438 63630
177887 1724...

output:

1
0
1
0
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0
0
1
1
1
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
1
1
1
0
0
1
1
...

result:

ok 200000 numbers

Test #27:

score: 34
Accepted
time: 246ms
memory: 174936kb

input:

200000 199999 200000
100115 113161
74063 76260
13627 56677
17663 103843
174211 191093
67872 77095
110148 176694
5534 33456
47228 16766
176697 190911
141208 141923
112682 127877
115644 142378
163360 153661
98078 109326
127834 101713
166445 149700
106530 114156
135997 133707
26503 8792
4424 54998
5130...

output:

1
0
1
0
1
1
0
0
0
1
1
1
0
0
1
0
1
0
1
0
0
1
1
0
0
0
0
1
0
0
0
1
0
0
0
0
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
0
0
1
0
1
1
0
1
0
1
0
1
0
0
0
0
1
1
0
0
0
0
1
0
0
0
1
0
0
1
0
1
0
0
0
1
1
1
1
1
0
1
1
1
1
1
0
0
0
0
0
1
0
1
0
0
1
1
0
0
1
0
0
0
0
1
1
0
1
1
1
1
1
0
1
1
0
1
0
1
0
1
1
0
0
1
1
0
1
0
0
0
0
1
1
0
0
...

result:

ok 200000 numbers

Test #28:

score: 34
Accepted
time: 400ms
memory: 186284kb

input:

200000 199999 200000
71066 71065
138912 138911
2809 2811
86416 86418
116025 116021
171081 171079
197320 197318
128086 128084
51529 51530
123713 123712
139182 139180
143844 143843
171218 171220
198040 198038
141707 141705
101268 101266
54112 54114
165477 165473
102504 102501
158427 158426
71823 71821...

output:

1
1
0
1
0
1
1
1
1
1
0
0
0
1
0
1
1
0
1
1
1
1
1
1
1
1
0
1
0
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
0
0
0
1
0
1
0
1
1
1
1
0
1
1
1
0
0
0
0
1
0
1
0
0
0
1
0
1
0
1
0
1
0
0
0
0
0
1
0
0
1
0
0
0
1
1
0
1
0
1
0
1
0
1
0
0
0
1
1
1
0
0
1
0
1
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
1
1
1
0
0
1
1
0
0
0
0
1
1
1
0
...

result:

ok 200000 numbers

Test #29:

score: 34
Accepted
time: 406ms
memory: 186340kb

input:

200000 199999 200000
42868 42870
82987 82986
140342 140344
198592 198589
145398 145396
131227 131228
119790 119789
196829 196832
99257 99258
82918 82916
101260 101263
195241 195240
54467 54466
152727 152728
67736 67735
84571 84569
140148 140147
182646 182643
188145 188146
94875 94879
68256 68255
138...

output:

0
0
0
0
0
0
1
0
1
0
1
0
0
0
1
1
0
1
1
1
0
1
0
1
0
0
1
0
1
1
1
1
1
1
0
0
0
1
1
1
1
0
1
0
1
1
1
1
0
1
1
0
0
1
0
0
1
1
0
0
0
0
1
0
1
1
1
1
0
0
0
0
0
0
1
1
1
1
1
1
1
0
0
0
1
0
0
1
1
0
1
1
1
1
0
1
0
1
0
0
0
0
1
0
1
0
1
1
1
1
0
0
0
1
0
0
1
0
1
1
0
1
0
0
0
1
1
1
1
0
0
1
1
1
1
1
0
0
1
0
1
1
0
0
1
0
1
0
1
1
...

result:

ok 200000 numbers

Test #30:

score: 34
Accepted
time: 401ms
memory: 185856kb

input:

200000 199999 200000
40107 40106
125952 125953
179296 179297
176270 176267
82483 82484
170808 170807
116763 116762
57835 57834
72187 72184
174412 174411
81518 81517
9002 9001
135104 135106
19743 19746
3954 3956
171697 171699
54670 54669
133995 133994
108711 108713
143358 143357
19208 19210
32104 321...

output:

0
0
0
0
1
0
0
1
0
0
1
0
0
1
1
1
1
0
1
1
1
1
1
1
1
0
1
0
1
1
0
0
1
1
0
1
0
0
1
0
0
1
0
1
0
1
0
0
1
1
0
1
0
0
0
0
0
0
0
1
0
1
0
1
1
1
0
0
1
1
1
1
1
0
0
1
0
0
0
1
0
1
0
1
0
1
0
0
0
0
1
1
1
0
0
0
1
1
0
0
0
1
1
1
1
1
1
0
1
1
1
0
1
1
0
0
0
1
0
0
1
1
1
1
1
1
1
0
0
1
1
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
0
0
1
0
...

result:

ok 200000 numbers

Test #31:

score: 34
Accepted
time: 385ms
memory: 186076kb

input:

200000 199999 200000
113314 113313
69959 69958
168190 168191
19292 19291
80448 80446
90219 90220
62768 62767
174810 174809
85469 85467
183604 183599
48109 48106
78391 78388
95374 95378
154578 154579
69351 69348
69787 69786
43059 43060
159666 159665
41243 41238
5420 5417
179073 179072
26320 26315
122...

output:

1
1
0
1
0
1
0
1
0
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
1
1
0
0
1
1
0
1
0
0
1
1
1
1
0
1
1
1
1
0
0
1
0
1
1
0
0
1
1
0
0
0
0
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
0
0
0
1
1
1
1
1
0
1
0
1
1
1
1
0
1
0
1
1
1
0
0
1
0
0
0
1
1
0
0
1
1
0
0
1
0
0
0
1
1
0
0
1
1
0
1
1
0
0
1
1
0
0
1
0
0
0
0
1
1
0
0
0
0
1
0
1
1
0
1
0
0
1
...

result:

ok 200000 numbers

Test #32:

score: 34
Accepted
time: 297ms
memory: 174536kb

input:

200000 199999 200000
142629 182303
111879 75271
49781 85231
103771 85779
129878 160154
7066 150402
13271 56559
113208 32060
122683 132619
18369 101055
106472 142538
68271 147355
61935 35733
179979 57375
25479 151993
78974 163818
100607 155581
31659 143687
56131 58637
66338 164552
24041 199328
132538...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
...

result:

ok 200000 numbers

Subtask #4:

score: 51
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #33:

score: 51
Accepted
time: 379ms
memory: 176440kb

input:

200000 199999 200000
108952 10305
16101 165694
40991 174292
43884 137956
77697 73446
29221 102355
157860 172771
9018 136815
136918 9462
153995 55928
8196 65931
147240 178113
37068 158009
121153 112730
198686 18972
52074 192047
113692 174999
175696 5774
39201 190744
172737 10880
139096 49106
77152 16...

output:

1
0
0
1
0
1
0
0
0
0
0
0
0
1
1
1
0
0
0
0
1
1
1
1
0
1
1
1
1
1
0
0
0
0
1
0
0
0
1
0
0
1
0
0
1
1
0
0
0
0
0
1
0
0
1
1
1
0
0
1
1
0
1
0
1
0
0
0
1
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
1
0
0
0
1
1
1
0
1
0
1
0
0
1
1
0
0
0
1
0
0
0
1
1
0
1
0
0
1
0
0
1
0
0
1
0
1
0
1
0
1
1
0
0
1
0
0
0
1
0
0
0
0
0
0
1
1
0
0
0
...

result:

ok 200000 numbers

Test #34:

score: 51
Accepted
time: 151ms
memory: 119856kb

input:

1500 400000 200000
211 1275
979 187
268 751
1421 146
845 308
1340 1239
937 231
903 1246
960 1143
113 1153
237 688
126 1396
920 833
984 279
1198 946
1110 344
155 462
687 45
113 449
1284 373
1275 1463
466 538
1429 91
879 648
744 389
73 965
668 153
407 615
451 871
228 1372
1446 1291
1097 331
1388 760
4...

output:

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

result:

ok 200000 numbers

Test #35:

score: 51
Accepted
time: 433ms
memory: 180632kb

input:

200000 220000 200000
37101 108068
174039 180241
75104 135736
20808 45465
59353 4626
100310 123688
9345 64579
14418 117626
179185 23331
145078 18953
18829 101718
57497 90913
17541 140051
40486 61151
174087 87020
110814 24431
78615 37222
137119 127804
58862 122868
94336 85176
54888 58167
41081 72389
1...

output:

1
1
1
1
1
1
1
1
1
0
1
0
1
1
0
1
1
1
1
1
1
1
0
1
1
0
0
0
1
1
1
1
1
1
1
0
1
0
1
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
0
1
1
0
1
0
1
0
1
1
0
1
1
0
1
1
1
0
0
0
1
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1
0
0
1
0
1
0
1
0
0
...

result:

ok 200000 numbers

Test #36:

score: 51
Accepted
time: 333ms
memory: 176144kb

input:

200000 205000 200000
178473 153532
155291 13392
70304 172568
43865 50786
157027 65034
67397 112888
80681 19662
89754 1688
171228 143475
69933 55748
103331 131177
124101 84079
119441 44322
142940 25231
187062 2266
192525 169601
161401 144022
174834 91329
83698 165251
178270 105859
24208 41794
98467 1...

output:

0
1
0
1
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
1
0
1
1
1
0
1
0
1
0
1
0
0
0
1
0
0
0
0
0
0
0
1
0
1
0
0
0
1
0
1
0
1
0
0
1
1
1
0
0
0
0
1
1
0
0
1
1
1
0
1
0
1
0
1
0
1
1
0
0
0
0
1
0
0
1
1
0
1
0
1
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
1
0
1
0
0
1
1
0
0
1
0
1
0
0
0
1
0
1
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
...

result:

ok 200000 numbers

Test #37:

score: 51
Accepted
time: 436ms
memory: 179132kb

input:

200000 210000 200000
128662 55365
59412 12934
12997 128279
160311 79252
188040 77068
125031 150839
141466 144626
173010 8062
129144 63355
108269 112495
56150 116098
60943 68359
134223 129347
153240 151514
61667 38649
29241 18240
138139 167151
145836 38527
198075 12343
72916 110785
64358 57929
139114...

output:

1
0
1
1
1
1
1
0
1
1
0
0
1
1
0
0
1
1
1
1
1
0
1
1
1
0
1
1
0
0
1
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
1
0
0
0
1
0
1
1
1
1
1
0
0
1
1
1
0
1
1
0
1
0
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
0
0
1
1
1
0
1
0
1
1
0
0
1
1
1
1
0
1
1
0
0
0
0
1
0
0
1
0
1
1
0
0
0
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
...

result:

ok 200000 numbers

Test #38:

score: 51
Accepted
time: 376ms
memory: 177232kb

input:

200000 209999 200000
100154 124380
110301 123644
108826 199585
47859 9897
119327 63015
56269 167636
55500 123949
36178 186239
11820 112870
156089 51075
29441 37033
177099 96579
113891 120860
54460 10257
198115 156409
154756 84978
80755 19223
92603 20222
20967 121978
34677 114971
151095 56612
3072 12...

output:

1
0
1
1
0
0
1
0
0
0
1
0
1
1
0
0
1
1
1
0
0
1
0
1
1
0
0
1
1
1
0
0
0
1
0
1
1
1
1
1
0
0
0
0
0
0
1
0
1
1
0
1
1
1
0
1
1
0
0
1
0
1
0
1
1
1
1
1
0
0
0
0
1
0
1
1
0
1
0
0
0
0
0
1
1
0
1
1
1
0
0
1
1
1
1
1
1
0
0
1
0
0
1
1
1
0
0
0
0
0
0
0
1
0
1
0
1
1
0
0
0
0
1
1
1
0
1
1
1
1
1
1
0
0
0
0
0
1
1
0
0
1
1
1
1
1
0
0
0
1
...

result:

ok 200000 numbers

Test #39:

score: 51
Accepted
time: 381ms
memory: 186564kb

input:

200000 201000 200000
62598 93881
125109 117355
4026 84526
155398 153153
197896 119505
126175 195171
24455 43312
3924 108835
42468 111529
152857 152516
27905 102486
8902 14048
106549 79244
22737 8957
77561 171117
83410 97399
101523 193579
70246 144782
9058 66315
93504 39284
125977 82668
4002 2496
170...

output:

0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
...

result:

ok 200000 numbers

Test #40:

score: 51
Accepted
time: 422ms
memory: 183672kb

input:

200000 400000 200000
177888 62420
124175 148125
82888 38184
127617 102533
124511 117489
77184 60917
152992 195856
3568 13966
27895 126977
15660 33215
1025 43797
28784 19340
14867 178837
130398 179680
92280 157569
13808 49696
978 9950
41582 25478
186287 5378
156428 198102
54259 160847
147886 105644
1...

output:

0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
1
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
1
0
...

result:

ok 200000 numbers

Test #41:

score: 51
Accepted
time: 345ms
memory: 177732kb

input:

200000 205000 200000
11433 42434
199311 81188
151134 198669
49838 197763
46735 103473
22818 136543
197714 188189
116047 199844
147104 89263
197665 175012
63298 38655
52910 120657
143128 78311
51338 23836
181307 84279
186054 13599
120460 154848
91731 91975
139085 97134
98505 146702
153940 152335
1177...

output:

1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
1
0
1
0
1
0
1
1
0
1
0
0
0
0
1
1
1
0
1
0
0
0
0
1
1
1
0
0
1
0
1
0
1
0
1
0
0
0
0
1
1
1
1
0
1
0
1
1
0
1
0
0
1
0
0
0
1
1
1
0
1
0
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
0
1
0
0
0
0
1
1
1
0
0
1
1
1
0
1
1
1
1
1
1
0
0
1
0
1
0
0
1
1
1
1
1
0
0
0
0
0
1
0
0
0
1
0
1
0
1
...

result:

ok 200000 numbers

Test #42:

score: 51
Accepted
time: 292ms
memory: 176056kb

input:

200000 205000 200000
92747 57129
174780 165942
174060 47162
198671 63278
100445 79979
120804 186875
62636 177121
123908 169042
18990 100234
77125 137104
166924 84868
510 38100
95593 14715
105336 44362
74955 96025
128718 180314
128319 165315
34369 26451
41852 48604
130427 29483
80669 39292
191925 126...

output:

1
1
1
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
1
0
1
1
0
0
1
0
1
1
1
1
1
0
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
0
1
1
0
0
1
0
1
1
1
1
...

result:

ok 200000 numbers

Test #43:

score: 51
Accepted
time: 452ms
memory: 185116kb

input:

200000 299999 200000
156478 50784
23754 140020
101400 196062
26715 123031
199588 144251
97900 27882
6620 165342
104747 44917
169640 76270
87916 194853
139986 86997
149113 40015
144971 101164
158827 98093
161089 137974
12892 190929
82666 191663
155029 194884
8342 91207
128295 145341
158450 147155
655...

output:

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

result:

ok 200000 numbers

Test #44:

score: 51
Accepted
time: 431ms
memory: 179408kb

input:

200000 210000 200000
173900 177101
46712 13702
130662 77457
180150 19060
139894 128201
113310 74491
44395 48796
150616 59348
131273 25773
8180 35584
22331 158695
176673 70099
105742 198135
165578 191813
100020 86694
99625 47592
163250 35160
80887 159534
128499 198072
55115 73258
96207 184132
132568 ...

output:

0
1
1
1
1
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
0
1
1
1
1
0
0
1
0
0
1
1
1
0
1
0
1
1
1
1
0
1
0
1
0
0
1
1
0
1
1
1
1
1
1
1
0
1
0
1
0
0
1
0
1
0
0
1
1
0
1
0
1
1
0
0
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
0
0
1
1
0
1
0
0
1
1
0
0
0
1
1
1
0
1
1
1
1
1
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
...

result:

ok 200000 numbers

Test #45:

score: 51
Accepted
time: 332ms
memory: 185244kb

input:

200000 209999 200000
26125 161357
34145 33217
120991 23956
73573 13709
4413 106051
18249 135052
68071 20925
32744 143696
93373 158418
117571 85591
54679 62983
44120 89294
77322 72712
27541 15442
4250 174759
86211 140102
78023 48131
72564 84806
143328 84091
70650 2979
15018 6968
58165 73237
132296 49...

output:

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

result:

ok 200000 numbers

Test #46:

score: 51
Accepted
time: 339ms
memory: 185224kb

input:

200000 201000 200000
20184 196504
127487 48312
71802 104351
120456 177570
138344 39488
114287 198683
76349 124922
67785 9161
47085 159561
12249 43782
123250 131431
36427 164565
135198 39733
4864 7138
111432 40744
61096 77958
24201 43829
181277 196095
155903 165568
50125 131421
8295 7623
195585 82841...

output:

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

result:

ok 200000 numbers

Test #47:

score: 51
Accepted
time: 480ms
memory: 185836kb

input:

200000 205000 200000
178658 178659
25366 25368
19157 19158
73201 73200
89681 89683
175060 175059
145352 145346
171238 171239
157724 157723
150324 150325
131538 131537
77575 77574
126400 126397
100624 100625
89111 89112
55204 55209
114531 114528
184404 184405
39904 39903
81043 81044
84626 84624
26252...

output:

0
0
0
1
1
0
0
0
0
1
1
0
0
1
0
0
0
1
0
1
0
1
0
0
0
0
0
0
0
1
0
0
0
1
1
0
1
0
1
0
0
1
1
0
0
0
0
1
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
1
0
0
1
0
1
0
0
1
0
0
0
1
0
0
0
1
1
0
0
1
0
0
1
1
1
1
0
1
1
1
0
1
1
1
1
1
0
0
0
0
0
1
1
0
0
0
1
1
1
1
1
1
1
1
0
1
1
1
0
0
0
0
1
1
1
0
1
1
1
0
0
1
0
1
0
0
0
1
1
0
0
0
0
1
...

result:

ok 200000 numbers

Test #48:

score: 51
Accepted
time: 501ms
memory: 185788kb

input:

200000 200500 200000
111740 111739
164052 164054
21225 21229
48670 48669
40489 40488
13785 13783
20546 20551
121987 121985
58903 58906
167519 167517
17549 17548
94455 94456
67617 67618
61881 61877
120550 120554
117044 117048
91439 91438
172946 172944
124810 124809
102494 102495
61907 61908
106546 10...

output:

0
0
1
1
0
1
0
1
0
1
0
1
1
0
0
1
0
1
1
1
0
0
1
0
1
1
0
0
0
1
1
1
1
1
1
0
1
0
1
1
0
0
1
0
1
1
1
1
0
1
0
1
0
0
1
1
0
0
1
1
0
0
0
1
1
0
1
1
0
0
0
1
1
1
0
0
1
0
0
0
0
0
1
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
0
0
1
0
1
0
1
0
1
0
1
1
0
0
0
1
1
0
1
0
1
0
0
0
1
1
1
0
0
0
1
1
1
0
0
0
0
0
1
1
1
0
0
1
0
1
1
1
1
0
...

result:

ok 200000 numbers

Test #49:

score: 51
Accepted
time: 483ms
memory: 185600kb

input:

200000 205000 200000
4689 4691
122541 122540
113306 113305
57531 57534
27335 27336
35022 35023
19439 19435
79344 79349
31633 31631
107059 107061
152968 152967
84821 84826
108177 108179
81189 81187
102744 102749
150659 150662
69883 69879
78490 78491
149168 149169
7133 85334
172329 172328
152907 76141...

output:

1
1
1
1
1
1
1
1
0
1
1
1
0
0
1
1
1
0
1
1
0
1
1
0
0
1
1
1
0
0
0
0
0
1
0
0
0
0
0
1
1
0
0
0
1
1
1
0
0
0
1
0
1
0
0
1
0
1
0
0
0
1
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
1
1
0
1
0
0
0
0
0
1
0
0
1
1
1
0
0
1
0
1
0
1
0
1
0
0
0
0
1
1
0
0
0
1
0
1
1
1
1
0
0
1
1
1
0
0
0
0
0
1
0
1
1
1
1
0
0
1
0
1
0
1
0
1
1
1
0
...

result:

ok 200000 numbers

Test #50:

score: 51
Accepted
time: 497ms
memory: 185072kb

input:

200000 200500 200000
11707 11703
158429 158428
147131 147130
10537 10535
19940 19943
43701 43702
8562 8563
147825 147823
103528 103526
149614 149612
31882 31883
64615 64614
84785 84794
92524 92526
150362 150363
17237 17231
83786 83785
22625 22628
134650 134645
100891 100890
36204 36201
110134 110136...

output:

0
1
1
0
1
0
1
1
0
1
0
0
0
0
1
1
1
0
1
0
1
0
0
0
1
0
0
0
0
1
0
0
1
1
1
0
1
0
0
0
0
1
1
0
1
1
1
1
1
1
0
1
0
1
1
0
0
0
0
0
1
0
0
0
1
0
1
0
0
0
0
0
0
1
0
1
1
1
1
0
1
1
1
0
0
0
1
1
1
0
1
1
1
0
1
0
1
1
0
0
0
1
0
1
1
0
1
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
1
1
1
0
0
0
1
1
1
1
0
0
1
0
1
1
0
1
0
1
0
1
...

result:

ok 200000 numbers

Test #51:

score: 51
Accepted
time: 423ms
memory: 183272kb

input:

200000 400000 200000
112428 27730
52879 121509
64675 192774
108533 125922
70194 61923
53714 41026
5938 39862
32627 37765
111226 119141
101145 61740
169063 31139
42223 113067
111246 199032
162772 157135
199619 2716
154318 192890
55499 33497
130007 197344
97107 165268
54907 93550
168490 127777
24364 4...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

ok 200000 numbers

Test #52:

score: 51
Accepted
time: 421ms
memory: 182616kb

input:

200000 400000 200000
115658 188359
6031 122819
73191 67037
85087 190834
124582 75484
32359 151692
49476 84089
162737 20155
35855 82318
5435 66525
59670 136528
168340 113155
51765 130843
175591 27609
50249 110542
122447 195460
77795 117498
52349 16102
169368 62294
83148 31082
134288 123923
100153 127...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

ok 200000 numbers

Extra Test:

score: 0
Extra Test Passed