QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#44468#1390. Królewski bal [B]SuffixTree10 ✓1394ms85280kbC++174.2kb2022-08-17 19:05:532022-08-17 19:05:55

詳細信息

Subtask #1:

score: 1
Accepted

Test #3:

score: 1
Accepted
time: 12ms
memory: 17900kb

input:

1 0 0

output:

0

result:

ok single line: '0'

Test #4:

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

input:

1 1 0
1 1 1 1

output:

0

result:

ok single line: '0'

Test #5:

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

input:

10 20 0
5 1 6 3
1 2 3 8
6 1 10 4
5 2 8 9
5 7 9 10
1 4 3 7
5 4 7 10
1 6 4 9
2 2 9 5
3 1 3 3
2 3 9 7
6 1 10 4
3 1 7 7
4 1 7 8
3 5 8 10
5 6 10 9
9 1 10 8
2 2 5 9
1 3 6 6
9 6 9 9

output:

48

result:

ok single line: '48'

Test #6:

score: 0
Accepted
time: 5ms
memory: 18396kb

input:

50 9998 0
13 1 43 21
31 3 41 40
12 12 20 36
24 12 46 32
7 2 27 28
2 44 19 45
35 32 41 36
33 4 42 45
6 17 21 39
5 16 37 28
31 10 37 21
38 33 47 37
2 38 5 46
3 3 24 20
16 33 25 43
3 35 42 50
13 38 25 44
37 1 41 38
4 37 48 45
2 24 45 45
21 26 49 31
1 34 28 42
14 7 24 23
13 21 39 33
24 12 39 35
15 2 49 ...

output:

1230

result:

ok single line: '1230'

Test #7:

score: 0
Accepted
time: 9ms
memory: 18200kb

input:

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

output:

1243

result:

ok single line: '1243'

Test #8:

score: 0
Accepted
time: 5ms
memory: 18372kb

input:

50 9998 0
12 22 50 37
42 13 43 50
1 4 33 42
7 1 49 46
19 1 49 50
2 25 35 42
9 7 43 34
4 19 50 33
10 36 26 38
18 26 46 47
18 6 47 46
1 4 38 45
2 18 49 47
41 2 47 42
6 19 32 31
1 1 46 30
6 6 41 31
4 19 46 37
1 1 39 23
20 16 49 24
31 16 49 36
6 12 38 50
31 5 39 18
5 29 49 42
40 11 44 42
9 3 48 12
4 4 1...

output:

1243

result:

ok single line: '1243'

Test #9:

score: 0
Accepted
time: 16ms
memory: 18332kb

input:

50 9998 0
32 16 48 38
25 16 49 36
35 6 38 21
2 13 37 14
39 10 48 37
4 5 34 50
1 11 40 45
5 3 44 48
3 7 48 39
27 39 45 40
18 6 22 31
15 6 48 36
27 18 30 34
3 10 22 43
25 2 50 50
31 3 40 33
14 2 22 25
28 4 47 32
3 3 43 33
7 20 38 42
14 17 42 40
2 30 31 50
14 12 40 50
6 1 11 40
15 1 49 50
25 13 49 47
3...

output:

1247

result:

ok single line: '1247'

Test #10:

score: 0
Accepted
time: 9ms
memory: 18364kb

input:

50 10000 0
25 32 50 41
39 14 46 19
2 7 11 30
7 28 37 36
19 9 29 18
11 30 39 46
27 3 48 39
3 11 39 49
6 9 30 36
3 2 25 28
18 23 40 25
10 25 31 43
2 27 30 42
4 5 36 39
16 20 30 36
11 5 42 41
7 10 37 26
19 3 43 37
1 22 13 38
22 10 42 37
35 13 46 14
19 6 43 25
10 23 44 25
5 16 30 34
15 7 34 49
4 16 31 4...

output:

455

result:

ok single line: '455'

Test #11:

score: 0
Accepted
time: 9ms
memory: 18372kb

input:

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

output:

741

result:

ok single line: '741'

Test #12:

score: 0
Accepted
time: 6ms
memory: 18368kb

input:

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

output:

453

result:

ok single line: '453'

Test #13:

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

input:

50 10000 0
36 20 37 21
23 26 24 27
48 3 48 3
19 26 20 27
29 25 30 26
30 36 31 37
47 5 47 5
7 28 7 28
5 45 6 45
13 22 13 23
22 19 23 19
4 47 4 48
42 9 43 9
26 42 27 43
30 20 31 21
17 31 18 31
30 48 30 48
45 9 46 9
26 32 26 33
27 7 28 7
48 42 48 43
2 23 3 24
3 25 4 25
3 7 4 8
47 11 48 12
16 7 16 7
27 ...

output:

1210

result:

ok single line: '1210'

Test #14:

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

input:

50 10000 0
33 40 34 40
47 10 48 11
35 7 35 8
17 28 18 29
10 31 11 31
16 27 17 28
28 24 28 24
45 4 45 4
14 8 14 9
14 28 14 28
33 7 34 7
21 14 21 14
5 18 5 19
15 23 16 23
16 13 16 13
33 22 34 22
30 24 30 25
12 29 13 30
21 37 22 37
48 34 49 35
4 46 4 47
41 46 42 47
37 30 37 31
21 35 21 36
39 34 39 34
3...

output:

1243

result:

ok single line: '1243'

Test #15:

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

input:

50 9999 0
8 7 8 8
2 31 3 32
8 33 8 34
14 5 14 5
18 46 19 46
49 46 49 47
30 13 31 14
15 45 16 45
17 24 18 25
21 17 22 18
24 34 25 35
10 37 10 38
21 38 22 39
12 47 13 47
44 47 44 47
46 26 46 26
3 8 4 9
30 21 31 22
47 1 48 1
10 17 10 18
31 18 32 19
27 21 27 21
33 43 33 43
3 25 4 25
35 45 36 46
31 21 31...

output:

1247

result:

ok single line: '1247'

Test #16:

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

input:

50 10000 0
33 39 34 39
12 25 14 25
16 10 18 11
25 45 27 48
22 28 24 30
19 32 23 35
4 4 7 6
38 36 39 37
17 43 21 46
36 16 39 19
33 1 37 5
1 2 4 3
34 29 34 32
38 3 38 5
12 26 15 30
38 27 39 31
24 17 27 18
28 17 28 19
28 34 28 34
25 31 29 34
23 6 26 10
9 25 9 26
23 43 27 43
4 25 7 25
18 18 20 19
2 12 5...

output:

1236

result:

ok single line: '1236'

Test #17:

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

input:

50 50 0
50 15 50 34
19 12 19 38
1 15 1 34
9 21 9 26
3 20 3 28
41 22 41 26
31 23 31 24
49 23 49 24
36 19 36 31
33 23 33 25
12 23 12 25
32 23 32 23
40 23 40 23
2 22 2 25
46 23 46 24
42 23 42 25
35 22 35 25
47 15 47 34
39 23 39 25
11 22 11 25
18 21 18 27
45 15 45 36
6 18 6 33
26 23 26 24
21 23 21 25
38...

output:

493

result:

ok single line: '493'

Test #18:

score: 0
Accepted
time: 9ms
memory: 17932kb

input:

50 50 0
36 29 36 34
3 29 3 35
10 29 10 33
2 28 2 36
32 14 32 50
13 1 13 50
18 28 18 37
22 25 22 43
14 22 14 45
27 29 27 33
4 30 4 30
20 41 23 42
42 21 42 47
5 1 5 50
34 29 34 32
17 29 17 32
46 29 46 33
24 1 24 50
8 29 8 32
39 25 39 42
29 30 29 32
49 30 49 31
11 7 11 50
12 29 12 35
35 29 35 34
19 28 ...

output:

647

result:

ok single line: '647'

Subtask #2:

score: 1
Accepted

Test #19:

score: 1
Accepted
time: 80ms
memory: 21624kb

input:

200 99999 10
25 12 33 165
21 46 190 51
44 22 47 130
57 12 69 31
40 54 151 176
55 173 113 175
141 153 192 192
24 47 128 141
7 119 58 133
79 25 181 36
58 1 66 66
61 93 178 104
98 14 129 163
14 3 164 63
113 39 173 132
49 3 171 38
82 43 144 153
166 75 191 135
19 39 99 121
92 52 170 155
118 24 199 112
1 ...

output:

19976
19977
19978
19977
19978
19979
19978
19977
19978
19977
19976

result:

ok 11 lines

Test #20:

score: 0
Accepted
time: 74ms
memory: 21428kb

input:

199 100000 10
66 75 161 177
38 20 189 35
69 134 128 179
35 62 83 72
72 130 77 152
47 38 182 92
17 18 156 193
25 42 132 77
21 36 44 185
17 28 122 44
38 3 168 65
174 29 192 110
29 39 51 127
12 156 188 191
18 9 167 63
74 40 87 71
33 30 163 126
90 72 116 98
39 22 63 35
12 64 121 75
28 51 139 92
5 3 20 3...

output:

19717
19718
19717
19716
19715
19714
19713
19712
19711
19712
19711

result:

ok 11 lines

Test #21:

score: 0
Accepted
time: 74ms
memory: 21668kb

input:

200 100000 10
70 20 119 132
33 34 197 69
11 88 167 172
18 11 193 195
2 10 148 186
17 142 131 184
56 44 169 51
123 93 185 176
4 58 111 96
2 75 197 78
143 16 195 108
7 48 199 90
25 85 154 172
119 31 199 137
44 38 199 193
3 49 192 111
140 35 182 114
86 1 131 179
79 55 167 137
77 26 174 138
35 2 167 172...

output:

19802
19803
19804
19803
19802
19803
19802
19803
19804
19805
19806

result:

ok 11 lines

Test #22:

score: 0
Accepted
time: 89ms
memory: 21868kb

input:

197 100000 10
36 34 184 110
53 118 194 139
48 5 174 181
133 138 178 194
156 65 169 90
5 75 164 137
95 56 163 153
67 83 77 97
29 65 114 102
119 107 124 111
38 63 164 113
48 49 122 126
146 53 165 193
9 19 179 44
74 15 109 22
103 68 186 175
31 141 35 184
79 62 195 115
126 106 147 132
133 98 195 166
119...

output:

8223
8224
8224
8225
8226
8226
8226
8226
8227
8227
8228

result:

ok 11 lines

Test #23:

score: 0
Accepted
time: 77ms
memory: 21860kb

input:

199 100000 10
54 81 191 178
1 52 139 166
119 130 144 194
12 49 144 115
61 70 192 132
15 7 123 186
42 20 118 73
132 7 139 159
177 29 191 194
25 102 29 123
44 48 131 192
127 96 166 158
1 100 25 143
17 94 99 179
83 27 130 137
21 57 192 157
94 20 154 145
16 28 46 151
38 105 113 183
111 37 191 193
66 76 ...

output:

10285
10286
10287
10288
10289
10290
10291
10292
10292
10293
10293

result:

ok 11 lines

Test #24:

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

input:

196 99998 10
183 77 184 78
181 92 182 93
157 112 158 113
165 39 166 40
79 147 79 148
11 15 11 15
140 8 141 9
125 107 126 108
27 154 28 155
177 113 177 113
109 70 110 70
114 64 114 64
146 1 146 1
82 15 82 16
116 30 116 31
135 49 136 49
49 133 49 134
81 34 82 34
185 59 186 59
128 5 128 6
33 159 33 160...

output:

19032
19033
19032
19033
19032
19031
19030
19031
19032
19031
19032

result:

ok 11 lines

Test #25:

score: 0
Accepted
time: 37ms
memory: 21628kb

input:

200 99999 10
80 19 81 19
51 196 51 196
149 34 149 34
6 57 6 58
43 195 44 196
145 119 146 120
25 82 25 83
169 164 170 165
3 86 3 86
83 141 84 142
51 68 52 68
17 143 18 144
63 47 63 48
195 185 195 185
150 120 150 120
27 137 27 138
7 35 7 35
197 131 197 132
125 159 125 159
191 65 191 66
158 118 159 118...

output:

19789
19790
19791
19790
19791
19790
19789
19788
19789
19790
19791

result:

ok 11 lines

Test #26:

score: 0
Accepted
time: 54ms
memory: 22064kb

input:

199 100000 10
191 5 194 5
137 61 141 64
91 46 94 50
50 47 54 49
62 61 65 62
175 12 175 13
52 44 55 44
150 38 150 39
176 44 176 46
90 118 91 120
112 142 114 146
155 164 158 165
111 178 113 182
66 81 67 84
114 2 116 4
88 179 88 180
61 166 62 167
106 65 107 67
149 50 151 52
45 135 47 138
48 126 52 130
...

output:

19798
19797
19798
19799
19800
19800
19800
19799
19800
19799
19798

result:

ok 11 lines

Test #27:

score: 0
Accepted
time: 5ms
memory: 18048kb

input:

200 200 10
134 164 183 164
146 106 159 106
149 148 156 148
146 185 160 185
135 86 180 86
142 184 167 184
148 190 156 190
142 80 163 80
148 155 156 155
148 54 156 54
146 60 159 60
148 7 157 7
144 192 161 192
149 178 156 178
10 85 200 85
137 195 174 195
142 10 162 10
138 16 173 16
135 145 179 145
148 ...

output:

7086
7087
7086
7087
7088
7089
7090
7091
7092
7091
7092

result:

ok 11 lines

Subtask #3:

score: 1
Accepted

Test #28:

score: 1
Accepted
time: 77ms
memory: 21824kb

input:

198 100000 10
61 12 104 104
33 77 82 181
27 26 120 122
46 6 100 127
172 90 190 144
152 73 156 79
6 140 162 196
38 10 64 80
66 112 97 114
38 55 96 160
121 91 192 189
26 160 124 160
41 34 97 131
17 79 170 133
118 75 146 122
168 24 173 53
65 72 72 182
56 64 69 78
172 17 198 97
67 103 163 115
24 84 71 1...

output:

19572
19571
19570
19571
19572
19571
19572
19571
19572
19573
19574

result:

ok 11 lines

Test #29:

score: 0
Accepted
time: 72ms
memory: 21800kb

input:

200 100000 10
16 86 117 173
118 6 133 188
7 116 177 199
10 59 179 199
2 120 145 128
32 63 150 185
46 31 160 147
124 3 172 182
13 20 132 163
18 10 171 182
104 17 179 199
14 83 198 112
117 125 180 150
43 124 148 177
147 6 189 187
33 15 192 77
11 44 168 191
68 91 75 145
29 3 195 117
4 5 127 181
109 12 ...

output:

19893
19892
19893
19892
19891
19892
19893
19894
19895
19894
19895

result:

ok 11 lines

Test #30:

score: 0
Accepted
time: 71ms
memory: 21668kb

input:

195 99997 10
46 43 69 150
163 5 188 143
15 40 111 186
5 10 150 193
83 127 156 137
86 90 109 190
6 63 175 133
8 66 188 189
143 68 178 183
79 82 138 111
42 83 177 91
11 12 80 194
34 12 61 172
37 54 166 188
10 26 168 136
78 11 82 186
129 20 142 121
105 7 192 83
13 12 195 186
46 11 184 138
104 38 170 16...

output:

18794
18793
18794
18793
18792
18793
18792
18791
18792
18793
18794

result:

ok 11 lines

Test #31:

score: 0
Accepted
time: 81ms
memory: 21740kb

input:

200 100000 10
31 105 195 145
93 127 182 144
28 133 144 163
17 140 84 171
38 29 185 136
19 46 55 126
68 7 91 133
83 98 171 184
35 94 183 161
175 50 199 129
44 78 151 133
110 71 167 172
111 49 180 169
50 84 161 100
87 63 195 73
57 64 91 156
11 99 105 180
36 88 94 187
93 116 137 169
6 174 134 174
42 15...

output:

13845
13846
13846
13847
13848
13848
13848
13848
13848
13849
13849

result:

ok 11 lines

Test #32:

score: 0
Accepted
time: 70ms
memory: 21820kb

input:

198 99996 10
48 45 128 86
17 61 141 145
92 50 140 151
124 21 167 157
102 13 182 172
81 69 173 130
62 93 146 197
28 25 39 150
22 73 118 147
15 13 125 44
21 50 82 180
26 69 53 119
21 22 114 59
57 63 82 172
115 51 193 172
40 26 190 95
106 112 172 189
3 48 120 120
134 16 172 132
18 5 191 89
77 11 142 65...

output:

8964
8964
8964
8965
8966
8967
8968
8969
8970
8971
8971

result:

ok 11 lines

Test #33:

score: 0
Accepted
time: 56ms
memory: 21900kb

input:

199 99996 10
153 175 153 175
142 47 142 47
3 89 3 89
151 88 151 88
100 195 100 195
179 14 180 14
22 77 23 77
121 148 121 149
28 71 29 71
132 53 133 54
14 28 14 29
52 113 52 114
117 60 118 61
174 146 174 146
54 168 54 168
72 40 72 41
138 45 138 45
101 68 101 68
26 120 27 120
109 137 109 137
30 69 31 ...

output:

19773
19774
19773
19774
19775
19776
19777
19778
19779
19780
19781

result:

ok 11 lines

Test #34:

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

input:

200 99998 10
184 24 184 24
96 2 97 3
99 176 100 177
80 79 80 80
78 24 79 24
77 158 78 158
85 90 86 91
112 69 113 69
50 107 51 107
6 29 7 29
170 65 170 65
17 164 18 164
129 77 129 77
188 197 189 197
83 91 84 91
180 14 180 15
171 55 171 55
47 5 47 5
122 59 122 60
9 33 9 33
175 145 176 145
185 83 186 8...

output:

19866
19867
19866
19867
19868
19867
19868
19867
19866
19865
19866

result:

ok 11 lines

Test #35:

score: 0
Accepted
time: 64ms
memory: 22008kb

input:

200 100000 10
175 91 177 95
177 88 181 91
34 45 35 49
76 161 80 164
142 195 145 197
174 55 178 59
76 44 80 46
88 165 89 165
140 178 143 182
82 110 86 111
83 161 85 163
79 153 82 154
12 44 13 45
101 77 101 81
177 194 179 198
7 25 8 25
66 98 69 101
41 96 44 98
40 124 43 125
42 120 43 121
113 100 116 1...

output:

19820
19819
19818
19817
19816
19817
19818
19819
19818
19819
19820

result:

ok 11 lines

Test #36:

score: 0
Accepted
time: 5ms
memory: 17972kb

input:

197 200 10
126 48 126 53
9 49 9 52
156 30 156 71
124 41 124 57
148 40 148 60
195 48 195 52
29 1 29 106
85 38 85 64
49 47 49 53
121 25 121 76
145 1 145 102
151 49 151 52
96 40 96 62
20 41 20 57
40 27 40 73
131 40 131 63
109 31 109 71
13 48 13 53
1 38 1 67
122 32 122 70
37 41 37 56
118 1 118 197
117 4...

output:

7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966

result:

ok 11 lines

Subtask #4:

score: 1
Accepted

Test #37:

score: 1
Accepted
time: 117ms
memory: 22092kb

input:

1998 100000 4996
775 369 991 1761
1602 537 1960 1167
361 1256 1522 1569
261 322 1165 1934
39 286 1996 1996
260 994 1739 1651
600 1043 1368 1593
679 1167 1481 1338
149 21 959 1234
1096 348 1965 1246
1827 933 1834 1443
418 341 490 637
76 518 1974 1492
385 1501 390 1608
153 353 1689 459
1451 402 1549 1...

output:

1995864
1995863
1995862
1995863
1995864
1995863
1995864
1995863
1995862
1995863
1995864
1995865
1995864
1995865
1995866
1995865
1995864
1995863
1995864
1995863
1995862
1995863
1995864
1995863
1995862
1995863
1995862
1995863
1995862
1995861
1995860
1995861
1995860
1995859
1995858
1995857
1995856
1995...

result:

ok 4997 lines

Test #38:

score: 0
Accepted
time: 115ms
memory: 21892kb

input:

2000 100000 4998
16 682 230 1431
491 196 1355 1519
511 285 730 1688
1193 693 1970 898
217 24 772 488
151 1004 1357 1329
586 674 1426 1141
420 743 1072 1747
144 732 479 965
676 24 1803 930
65 578 1966 774
91 1537 1768 1804
693 1060 1675 1291
775 257 1775 1479
255 234 763 866
1 1269 758 1805
194 236 2...

output:

1999850
1999849
1999850
1999851
1999852
1999853
1999852
1999851
1999852
1999853
1999852
1999851
1999852
1999853
1999854
1999855
1999854
1999853
1999852
1999853
1999854
1999855
1999854
1999855
1999854
1999853
1999854
1999855
1999856
1999855
1999854
1999853
1999852
1999851
1999852
1999853
1999852
1999...

result:

ok 4999 lines

Test #39:

score: 0
Accepted
time: 117ms
memory: 22048kb

input:

2000 100000 5000
71 166 788 503
1461 1031 1521 1851
17 17 1977 148
122 1521 806 1700
583 1438 1133 1504
1127 478 1190 849
371 894 549 1967
7 135 693 1086
155 478 1123 798
203 1451 1433 1948
32 924 619 1767
119 496 535 1777
47 506 366 1714
781 637 1338 1878
309 444 1300 1974
147 755 1788 1976
1245 55...

output:

1999300
1999301
1999302
1999301
1999300
1999301
1999300
1999299
1999298
1999297
1999298
1999297
1999296
1999295
1999294
1999295
1999294
1999293
1999294
1999295
1999296
1999295
1999294
1999295
1999294
1999293
1999292
1999291
1999290
1999289
1999288
1999287
1999286
1999287
1999286
1999287
1999286
1999...

result:

ok 5001 lines

Test #40:

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

input:

2000 100000 5000
471 898 1154 1562
165 1275 1527 1492
454 566 1978 1692
30 502 1703 1918
374 380 1617 562
265 989 1758 1529
806 261 1943 1252
256 79 360 1717
178 126 1987 1854
548 175 1981 1946
455 401 1157 1762
262 105 1460 514
854 667 1053 1783
227 421 746 1361
613 118 1314 1399
303 202 1995 379
7...

output:

1999203
1999204
1999203
1999202
1999201
1999200
1999201
1999202
1999201
1999200
1999201
1999202
1999203
1999204
1999205
1999206
1999207
1999208
1999209
1999208
1999209
1999210
1999211
1999212
1999211
1999212
1999213
1999212
1999211
1999212
1999211
1999212
1999211
1999210
1999209
1999210
1999211
1999...

result:

ok 5001 lines

Test #41:

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

input:

2000 100000 5000
1156 723 1376 1366
46 522 1943 1861
1059 733 1878 1569
129 1141 1908 1978
590 146 1744 984
16 584 1338 1506
466 257 1066 760
402 896 470 1910
769 1119 1418 1955
53 675 1585 1974
520 1411 1749 1792
847 124 1787 1817
193 658 1402 1429
79 496 1531 996
1798 104 1935 1636
95 1418 1989 18...

output:

1999333
1999332
1999333
1999334
1999335
1999336
1999337
1999338
1999339
1999338
1999337
1999336
1999337
1999338
1999339
1999338
1999339
1999338
1999337
1999336
1999335
1999334
1999333
1999334
1999335
1999336
1999335
1999336
1999337
1999336
1999337
1999338
1999337
1999336
1999335
1999336
1999337
1999...

result:

ok 5001 lines

Test #42:

score: 0
Accepted
time: 125ms
memory: 22544kb

input:

1998 100000 5000
118 51 1704 1117
209 129 1922 1898
483 357 1982 1769
5 136 1545 1701
227 954 1851 1713
36 332 1782 1631
43 1360 1816 1486
519 388 1597 1214
817 257 881 1150
11 56 1835 1181
136 142 1753 1417
1075 577 1893 1974
38 5 1839 1715
25 996 489 1326
95 888 1132 1647
25 1439 1987 1782
1062 39...

output:

1995146
1995145
1995144
1995143
1995142
1995141
1995142
1995143
1995144
1995145
1995146
1995147
1995148
1995149
1995148
1995147
1995146
1995147
1995146
1995147
1995148
1995147
1995148
1995147
1995148
1995149
1995148
1995147
1995148
1995147
1995148
1995149
1995148
1995149
1995148
1995147
1995146
1995...

result:

ok 5001 lines

Test #43:

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

input:

1998 100000 4997
1379 880 1630 1549
119 731 1645 1876
1272 414 1858 1877
998 17 1449 1519
406 1567 1822 1801
512 1122 1025 1795
640 262 1758 1676
1651 246 1889 1603
672 300 1235 505
307 191 1866 1050
156 80 1131 1574
1116 1789 1703 1820
582 363 660 1522
336 882 1676 1973
860 653 1804 701
194 270 751...

output:

1363868
1363869
1363870
1363870
1363871
1363872
1363873
1363874
1363875
1363876
1363877
1363878
1363878
1363878
1363878
1363878
1363878
1363879
1363880
1363881
1363881
1363882
1363882
1363883
1363883
1363884
1363885
1363886
1363887
1363887
1363888
1363889
1363889
1363889
1363889
1363890
1363891
1363...

result:

ok 4998 lines

Test #44:

score: 0
Accepted
time: 107ms
memory: 22388kb

input:

1997 100000 5000
706 991 1623 1395
684 834 1194 1819
564 283 1038 977
483 888 1472 1562
239 604 630 805
882 136 1954 1129
278 357 1770 882
470 1575 1365 1833
235 164 1657 1660
610 1357 1759 1870
1074 1010 1335 1792
6 1634 1772 1658
667 1465 1458 1729
1539 1611 1872 1639
57 1141 1053 1976
32 524 328 ...

output:

1243234
1243235
1243236
1243236
1243237
1243237
1243238
1243239
1243239
1243240
1243241
1243241
1243242
1243243
1243243
1243244
1243244
1243245
1243246
1243246
1243246
1243246
1243247
1243247
1243248
1243248
1243249
1243250
1243251
1243252
1243253
1243254
1243255
1243256
1243257
1243258
1243259
1243...

result:

ok 5001 lines

Test #45:

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

input:

1996 100000 5000
663 1036 1106 1416
335 968 1442 1649
794 189 1126 1835
254 169 488 616
233 536 1046 1804
453 139 1805 293
592 371 977 1714
1474 499 1533 1666
1055 109 1358 695
156 1349 1329 1699
166 151 1728 565
275 1858 836 1969
536 257 1414 662
53 1217 1597 1848
430 605 1441 1762
34 1472 1988 180...

output:

1034408
1034409
1034410
1034411
1034411
1034412
1034412
1034413
1034414
1034415
1034416
1034417
1034418
1034419
1034420
1034421
1034422
1034423
1034424
1034424
1034425
1034426
1034426
1034427
1034427
1034428
1034429
1034430
1034431
1034431
1034432
1034432
1034433
1034434
1034435
1034436
1034437
1034...

result:

ok 5001 lines

Test #46:

score: 0
Accepted
time: 124ms
memory: 22432kb

input:

1996 99997 5000
397 1167 590 1351
736 594 1713 1103
62 1679 450 1690
838 90 1790 1249
452 1871 1205 1955
330 2 651 476
343 313 1719 1292
1529 77 1716 535
109 163 308 1836
379 348 1663 954
1059 85 1124 1589
140 591 1388 1863
1032 677 1877 1471
1324 282 1554 1598
251 441 1672 1514
741 133 825 1605
832...

output:

818387
818388
818388
818389
818389
818390
818391
818392
818393
818394
818394
818394
818395
818395
818396
818396
818397
818398
818399
818399
818400
818401
818402
818403
818404
818405
818406
818407
818408
818409
818410
818411
818412
818412
818413
818414
818415
818416
818416
818417
818418
818419
818420...

result:

ok 5001 lines

Test #47:

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

input:

1996 700 5000
42 681 225 857
1817 1217 1818 1217
1342 1920 1343 1921
42 1 1305 1995
38 6 39 7
35 679 1772 759
35 681 1772 857
796 120 1119 1852
41 1180 799 1358
1107 1835 1108 1835
772 1297 773 1297
225 218 368 1433
132 753 820 1853
41 1798 799 1865
9 216 9 217
225 159 368 643
66 749 1134 755
792 12...

output:

229558
229559
229560
229561
229562
229563
229564
229565
229566
229567
229568
229569
229570
229571
229572
229573
229574
229575
229576
229577
229578
229579
229580
229581
229582
229583
229584
229585
229586
229587
229588
229589
229590
229591
229592
229593
229594
229595
229596
229597
229598
229599
229600...

result:

ok 5001 lines

Test #48:

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

input:

1996 697 5000
291 520 292 521
1100 494 1101 495
210 625 1118 1801
238 1817 404 1821
1913 1098 1914 1098
199 262 199 262
639 344 639 344
609 377 1610 896
237 1018 1117 1386
1582 998 1582 999
89 650 604 1564
730 161 731 162
1207 1194 1208 1194
94 1195 957 1256
875 1906 876 1907
94 377 957 896
926 1838...

output:

217225
217226
217227
217228
217228
217229
217230
217231
217232
217233
217234
217235
217236
217237
217238
217239
217240
217241
217242
217243
217244
217245
217246
217247
217248
217249
217250
217251
217252
217253
217254
217255
217255
217256
217257
217258
217259
217260
217261
217262
217263
217264
217265...

result:

ok 5001 lines

Test #49:

score: 0
Accepted
time: 13ms
memory: 18212kb

input:

2000 97 5000
183 488 183 489
344 599 345 600
929 1521 930 1521
742 1588 742 1589
1046 1323 1047 1324
1359 586 1360 586
359 411 360 412
933 1096 934 1096
1503 1388 1503 1389
1992 96 1992 97
535 1406 536 1406
1606 632 1606 632
1526 1940 1527 1941
1660 1798 1661 1798
1607 186 1608 186
1638 275 1639 275...

output:

119192
119193
119194
119195
119196
119197
119198
119199
119200
119201
119202
119203
119204
119205
119206
119207
119208
119209
119210
119211
119212
119213
119214
119215
119216
119217
119218
119219
119220
119221
119222
119223
119222
119223
119224
119225
119226
119227
119226
119227
119228
119229
119230...

result:

ok 5001 lines

Test #50:

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

input:

1996 100 5000
1375 1591 1375 1591
1487 1804 1487 1805
232 2 1036 1996
766 347 766 348
1174 520 1175 521
1966 1389 1967 1390
1151 326 1151 326
911 617 911 617
552 611 553 611
871 1413 871 1413
991 1711 992 1711
661 1651 662 1652
62 1638 63 1639
1243 121 1243 122
1011 1380 1012 1380
1634 1139 1635 113...

output:

120870
120871
120872
120873
120874
120875
120876
120877
120878
120879
120880
120881
120882
120883
120884
120885
120886
120887
120888
120889
120890
120891
120892
120893
120894
120895
120896
120897
120898
120899
120900
120901
120900
120901
120902
120903
120904
120905
120906
120907
120908
120909
120910...

result:

ok 5001 lines

Test #51:

score: 0
Accepted
time: 85ms
memory: 22036kb

input:

2000 100000 5000
9 1029 10 1032
184 803 187 803
1844 844 1847 845
105 1415 107 1416
1343 637 1346 637
108 1674 111 1675
1525 1383 1526 1387
690 1498 693 1499
1555 261 1559 264
1494 693 1495 695
104 1108 105 1112
516 1862 517 1862
673 1814 674 1814
1358 240 1360 243
124 1984 125 1988
130 279 134 283
...

output:

1819251
1819252
1819253
1819254
1819253
1819254
1819253
1819254
1819255
1819254
1819253
1819252
1819251
1819250
1819249
1819248
1819247
1819246
1819245
1819244
1819245
1819246
1819245
1819246
1819247
1819246
1819247
1819248
1819247
1819248
1819249
1819250
1819249
1819248
1819249
1819250
1819251
1819...

result:

ok 5001 lines

Test #52:

score: 0
Accepted
time: 78ms
memory: 22048kb

input:

1998 100000 5000
680 443 683 447
714 120 718 121
346 928 346 931
58 1256 61 1260
276 1717 279 1717
908 1118 912 1122
902 436 902 436
1385 147 1386 148
317 1488 319 1491
1729 1247 1730 1250
1023 1466 1027 1469
1183 1706 1186 1710
184 848 188 851
1041 33 1044 37
590 423 591 425
927 655 929 656
1790 17...

output:

1786815
1786816
1786817
1786818
1786817
1786816
1786815
1786816
1786815
1786816
1786815
1786814
1786815
1786814
1786815
1786816
1786817
1786816
1786815
1786816
1786817
1786818
1786817
1786818
1786819
1786820
1786819
1786820
1786819
1786818
1786817
1786818
1786819
1786820
1786819
1786820
1786821
1786...

result:

ok 5001 lines

Test #53:

score: 0
Accepted
time: 17ms
memory: 18292kb

input:

2000 2000 5000
135 327 153 327
136 1780 152 1780
85 1377 209 1377
135 1886 153 1886
137 429 150 429
136 1831 152 1831
127 995 170 995
136 1975 152 1975
128 571 170 571
137 1615 149 1615
135 193 152 193
134 772 157 772
127 1734 170 1734
135 515 154 515
122 1006 173 1006
2 1707 273 1707
136 783 152 78...

output:

231628
231629
231630
231631
231632
231633
231633
231634
231635
231634
231635
231636
231637
231638
231637
231638
231639
231640
231641
231642
231643
231644
231645
231646
231647
231648
231649
231650
231651
231652
231653
231654
231655
231656
231657
231658
231659
231660
231661
231661
231662
231663
231664...

result:

ok 5001 lines

Test #54:

score: 0
Accepted
time: 9ms
memory: 18372kb

input:

2000 2000 5000
346 1778 435 1778
342 1353 439 1353
387 1793 399 1793
387 1029 398 1029
368 138 415 138
344 277 435 277
387 971 400 971
373 558 409 558
387 1906 397 1906
385 684 400 684
374 1527 407 1527
371 485 414 485
281 1859 502 1859
375 1409 404 1409
372 1579 411 1579
387 713 400 713
341 1909 44...

output:

202881
202882
202883
202884
202885
202886
202886
202887
202888
202889
202890
202891
202892
202893
202894
202895
202896
202897
202898
202899
202900
202901
202902
202903
202904
202905
202906
202907
202908
202909
202910
202910
202911
202912
202913
202914
202915
202916
202917
202918
202919
202920
202921...

result:

ok 5001 lines

Subtask #5:

score: 1
Accepted

Test #55:

score: 1
Accepted
time: 966ms
memory: 65368kb

input:

300000 300000 0
111286 8433 181522 208880
103975 18048 166307 265794
219191 206072 231168 244635
39203 31482 254123 175874
210327 170835 224455 174259
23607 115325 298465 184339
164969 165055 165512 245381
63858 179069 225059 289296
80109 35085 187602 236259
110496 211546 115434 226722
195501 118136...

output:

44999578196

result:

ok single line: '44999578196'

Test #56:

score: 0
Accepted
time: 954ms
memory: 65368kb

input:

299998 299998 0
102929 141474 262240 275854
7086 16380 260617 159145
43899 146614 296374 286631
122612 67308 181921 136141
87968 47582 144236 87625
28575 135320 128152 151313
111824 42986 177512 291594
271524 63659 278281 80217
198670 28482 245550 209186
82312 15280 217306 25682
51535 169379 257124 ...

output:

44998583998

result:

ok single line: '44998583998'

Test #57:

score: 0
Accepted
time: 935ms
memory: 65000kb

input:

300000 299997 0
75788 244 189690 292148
33796 30582 250655 194450
118103 29514 259835 299876
70118 46710 236542 255922
155643 181414 240901 226800
141101 60414 284918 212623
145900 15996 235854 163300
104524 78694 295257 238361
11774 1579 189361 285466
76567 102999 245010 218769
50037 160933 176445 ...

output:

44999752677

result:

ok single line: '44999752677'

Test #58:

score: 0
Accepted
time: 802ms
memory: 65248kb

input:

300000 300000 0
203824 47881 266431 67968
130229 25145 182369 258589
2211 19679 191032 165814
49499 49008 180834 222388
69101 72358 287213 270479
164068 31510 277206 135165
96014 149516 224789 250953
59891 222514 87051 260460
14245 70231 172878 288296
54329 4949 196165 104230
37679 129463 116432 270...

output:

16917652389

result:

ok single line: '16917652389'

Test #59:

score: 0
Accepted
time: 814ms
memory: 65384kb

input:

299997 299997 0
38553 49361 62274 299098
56714 196188 116116 250373
63981 30360 267237 196687
42436 33061 285143 280010
52849 289514 171736 297589
173023 83886 278388 256183
120161 142483 144578 239181
147151 109153 291263 207746
80577 252288 285200 254047
59455 17712 157228 97886
9054 25528 259085 ...

output:

28987248085

result:

ok single line: '28987248085'

Test #60:

score: 0
Accepted
time: 635ms
memory: 63972kb

input:

299998 299999 0
136906 209617 222826 259970
107847 223242 180164 249501
75085 93681 282599 269781
214618 94513 214618 94513
173941 49709 256127 85004
109472 169299 162608 200318
85046 82330 85047 82330
52146 164851 138852 166662
142483 129367 194165 257620
35182 17978 263712 42933
234451 28547 25397...

output:

12915873389

result:

ok single line: '12915873389'

Test #61:

score: 0
Accepted
time: 641ms
memory: 63956kb

input:

300000 300000 0
22694 62083 79385 167560
86018 60503 180906 105709
104789 249209 104790 249209
202743 198404 230786 288343
32630 173187 32630 173188
138777 47283 259205 231701
92104 59526 278723 104214
22694 204004 79385 270369
121942 271667 231746 291394
25679 198404 187558 288343
283741 190828 283...

output:

12547832155

result:

ok single line: '12547832155'

Test #62:

score: 0
Accepted
time: 519ms
memory: 64584kb

input:

300000 300000 0
43686 139899 43687 139899
243599 286829 243602 286833
262212 73355 262214 73358
121008 34843 121008 34845
66500 264304 66503 264308
137029 68362 137030 300000
81811 168644 81812 168647
243048 259594 243051 259594
181977 244475 181978 244479
79972 68362 79973 300000
155653 45711 15565...

output:

26490590162

result:

ok single line: '26490590162'

Test #63:

score: 0
Accepted
time: 573ms
memory: 66176kb

input:

300000 300000 0
120392 202011 120392 221961
83963 207240 83963 216854
35060 97059 35062 97059
172854 210950 172854 213292
91022 223915 91022 223916
40936 211826 40937 212434
295283 64621 295286 64622
208562 157630 208562 157630
12000 186110 12000 186112
298339 211845 298341 212413
175492 211856 1754...

output:

884425938

result:

ok single line: '884425938'

Subtask #6:

score: 1
Accepted

Test #64:

score: 1
Accepted
time: 975ms
memory: 65412kb

input:

299999 300000 0
84800 82432 177603 104711
157235 89546 257890 161794
78116 55592 83881 150522
35148 135687 129164 232070
28820 57482 225080 63117
29409 141975 167249 224302
198440 188133 240740 202788
20552 50405 137348 159766
167048 132287 297967 138665
72493 89918 294575 99642
166385 51782 260778 ...

output:

44999266089

result:

ok single line: '44999266089'

Test #65:

score: 0
Accepted
time: 955ms
memory: 64880kb

input:

300000 300000 0
11001 7159 288326 238864
48326 127848 246841 214393
110 186314 287714 198137
99090 9186 260535 191167
179560 104826 290874 219410
20131 65050 293203 165782
10888 2886 294107 293954
5138 2039 236325 162763
54843 200962 275274 250742
47948 1538 286926 127470
7960 184197 282852 283562
2...

output:

44999993845

result:

ok single line: '44999993845'

Test #66:

score: 0
Accepted
time: 939ms
memory: 65012kb

input:

300000 300000 0
28304 67592 239881 292613
38502 117854 139355 250251
10889 9232 297019 272392
127980 7362 293260 285969
94604 22060 246891 187073
116624 4639 281745 169604
211316 214237 287010 247809
19724 208184 263872 232858
62575 15772 249165 230360
21875 29992 168749 133382
762 38417 169708 2541...

output:

44999654335

result:

ok single line: '44999654335'

Test #67:

score: 0
Accepted
time: 778ms
memory: 65316kb

input:

299996 300000 0
485 151352 27958 200228
123697 222681 217554 252206
23531 74229 145827 162737
140681 149943 198268 290412
153458 91630 225172 296050
27062 21613 99891 272217
134553 89228 257202 228168
57640 174186 226513 253474
105346 26806 277054 290688
8899 26963 89037 235547
131943 41371 168915 2...

output:

18669308008

result:

ok single line: '18669308008'

Test #68:

score: 0
Accepted
time: 808ms
memory: 65412kb

input:

299996 299999 0
164122 26570 273978 252342
33266 226628 205980 280672
222644 85229 298235 237316
139009 11964 260146 183905
80284 34058 265776 269073
160187 170541 294119 277162
111120 197728 154824 198664
35946 81476 58447 235618
29311 199740 255178 282584
169289 106549 276344 236412
199692 5215 27...

output:

21773906264

result:

ok single line: '21773906264'

Test #69:

score: 0
Accepted
time: 544ms
memory: 65032kb

input:

299997 299995 0
275957 87983 275958 87984
1048 240576 1048 240577
22681 286555 22682 286555
265690 51753 265691 51754
233703 277810 233703 277810
113735 245010 113736 245011
183346 290743 183347 290743
190567 1254 190567 1254
277556 219955 277556 219956
180618 183462 180618 183462
50682 189353 50682...

output:

13075911472

result:

ok single line: '13075911472'

Test #70:

score: 0
Accepted
time: 647ms
memory: 63944kb

input:

299998 299995 0
13647 293587 13648 293588
50504 168453 50514 194709
168968 116835 218711 139865
78742 97296 78854 194787
13923 97432 210284 167115
71735 253178 71736 253179
94038 19590 291001 218710
50600 2548 230193 80057
211000 63452 298292 293987
166322 193531 262816 214989
33367 24953 136557 353...

output:

12956833433

result:

ok single line: '12956833433'

Test #71:

score: 0
Accepted
time: 620ms
memory: 64624kb

input:

299998 300000 0
182131 56112 182131 231882
2952 74406 2952 213651
189689 2365 189690 285760
89266 277537 89266 277541
211269 56112 211269 231882
131758 118381 131759 118381
12326 175932 12326 175932
74239 257051 74239 257054
84311 183451 84314 183452
24498 297557 24498 297559
111835 29199 111835 292...

output:

42882166068

result:

ok single line: '42882166068'

Test #72:

score: 0
Accepted
time: 533ms
memory: 68004kb

input:

300000 300000 0
249128 243469 249132 243473
152427 260018 153400 260019
151868 50523 153977 50523
152676 11924 153161 11927
90541 129896 90545 129896
150979 70062 154876 70062
152646 240094 153181 240094
152393 190054 153424 190054
126896 83036 126896 83038
152642 81521 153185 81521
282405 235836 28...

output:

748169837

result:

ok single line: '748169837'

Subtask #7:

score: 1
Accepted

Test #73:

score: 1
Accepted
time: 58ms
memory: 22844kb

input:

6 100000 100000
1 1 6 2
3 1 5 5
2 3 2 5
1 3 6 3
1 6 3 6
2 4 4 4
3 2 5 2
1 3 2 4
2 2 2 4
3 2 5 6
1 2 2 5
3 3 4 5
5 2 5 6
5 1 6 5
1 1 4 2
1 5 6 6
5 1 6 6
2 5 3 5
6 1 6 2
4 5 5 5
1 1 5 3
1 1 6 2
1 1 3 3
1 2 6 4
1 5 4 6
5 1 6 2
2 1 3 6
1 2 3 6
1 2 2 3
1 2 6 4
1 3 5 6
1 1 6 2
2 4 5 5
1 3 5 4
2 1 3 1
2 1 ...

output:

16
17
18
17
18
17
18
17
16
15
14
15
16
17
16
17
18
17
18
17
18
17
18
17
18
17
16
15
14
15
16
17
18
17
18
17
16
17
16
15
16
15
14
15
14
15
16
15
16
17
18
17
18
17
18
17
16
17
16
15
16
15
14
13
14
13
14
15
14
15
16
15
14
15
16
17
16
17
18
17
18
17
16
15
16
15
16
15
14
15
16
15
14
15
16
15
16
17
16
15
...

result:

ok 100001 lines

Test #74:

score: 0
Accepted
time: 71ms
memory: 22788kb

input:

8 100000 99999
2 1 7 2
2 4 5 7
3 3 6 6
2 3 4 5
5 1 8 6
2 1 7 2
5 1 6 1
2 2 7 4
3 3 7 4
3 2 8 6
6 2 6 5
3 4 5 8
5 4 8 5
4 5 8 6
4 2 6 4
4 6 7 8
1 2 4 4
2 5 5 8
8 1 8 8
7 4 7 7
4 4 5 7
4 3 6 6
6 4 6 5
6 3 6 3
1 8 3 8
2 2 5 3
3 5 7 5
5 1 8 2
3 1 6 3
2 3 4 6
2 4 7 7
4 5 8 6
6 5 7 8
7 3 8 6
4 3 7 7
3 3 6...

output:

31
30
31
30
29
30
31
30
31
30
29
30
31
32
31
32
31
30
29
28
27
26
27
28
29
28
27
28
29
30
31
32
31
32
31
32
31
32
31
32
31
32
31
32
31
30
29
30
29
30
31
30
29
28
29
28
29
30
31
30
31
32
31
32
31
32
31
32
31
32
31
30
29
28
29
28
29
28
27
26
25
26
27
28
29
28
27
26
25
26
25
24
25
26
27
28
29
28
29
30
...

result:

ok 100000 lines

Test #75:

score: 0
Accepted
time: 315ms
memory: 37176kb

input:

100000 99995 100000
28548 88222 50513 99778
10767 52833 72182 65632
41874 21183 77539 52474
35315 11585 63585 70632
22040 61978 98576 79712
24029 11410 60547 54197
42535 3014 51034 96911
14178 35071 16032 57621
6503 17763 85601 50948
23854 40696 55517 91138
22111 34809 48872 51336
14650 33202 21826 ...

output:

4999484672
4999484673
4999484672
4999484671
4999484672
4999484673
4999484674
4999484675
4999484676
4999484675
4999484676
4999484675
4999484674
4999484673
4999484674
4999484675
4999484674
4999484675
4999484676
4999484675
4999484674
4999484673
4999484672
4999484671
4999484670
4999484671
4999484670
499...

result:

ok 100001 lines

Test #76:

score: 0
Accepted
time: 340ms
memory: 37196kb

input:

99998 100000 100000
6276 26104 98433 52334
56299 11637 90527 93788
11731 6653 97445 22567
3320 36060 77219 77134
5512 26749 26522 58676
48916 22644 54058 91667
43275 53174 68736 59156
19623 16527 70018 61062
8294 64841 97635 95092
10727 15235 94836 76298
39183 15574 75952 58154
8773 14519 93551 9525...

output:

4999791601
4999791600
4999791601
4999791602
4999791601
4999791600
4999791599
4999791598
4999791599
4999791598
4999791599
4999791598
4999791597
4999791598
4999791599
4999791598
4999791599
4999791598
4999791597
4999791596
4999791597
4999791596
4999791597
4999791598
4999791599
4999791600
4999791599
499...

result:

ok 100001 lines

Test #77:

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

input:

99995 99995 100000
29299 20015 80842 81598
66476 35798 83452 97324
24652 65150 98297 69124
61067 32211 66313 40379
7378 34024 55096 97557
6226 28403 91560 93841
22310 27083 64718 94228
18416 65694 64856 84346
15012 54562 84374 69845
10500 20589 97645 98583
57385 29281 83785 98061
48276 8424 54263 86...

output:

4999476661
4999476662
4999476661
4999476660
4999476659
4999476660
4999476661
4999476660
4999476659
4999476658
4999476659
4999476660
4999476659
4999476658
4999476659
4999476658
4999476659
4999476660
4999476659
4999476660
4999476659
4999476660
4999476659
4999476660
4999476659
4999476660
4999476659
499...

result:

ok 100001 lines

Test #78:

score: 0
Accepted
time: 306ms
memory: 36472kb

input:

99997 100000 100000
24230 33175 42168 91716
4311 19778 78295 92977
10493 66597 65558 76353
11506 41875 92131 86794
9248 39862 71950 71226
50952 14019 90724 39380
501 13598 10796 16444
5455 11737 71069 39740
8102 20965 33640 21648
52522 1536 71415 84257
10917 35725 57850 85240
55948 48633 92970 55633...

output:

2474378013
2474378014
2474378015
2474378016
2474378017
2474378018
2474378019
2474378019
2474378019
2474378020
2474378021
2474378022
2474378023
2474378024
2474378025
2474378026
2474378027
2474378027
2474378028
2474378028
2474378029
2474378030
2474378031
2474378031
2474378032
2474378033
2474378034
247...

result:

ok 100001 lines

Test #79:

score: 0
Accepted
time: 286ms
memory: 36520kb

input:

100000 100000 100000
18734 38655 81380 83187
9176 3759 96764 35334
98139 17498 98660 98440
77519 13827 80881 34519
2845 9757 76638 82601
1016 95371 97272 97424
16499 31784 40077 77149
17747 27069 82855 75289
72293 37869 85947 83697
15044 50653 84293 66164
10366 22744 84320 80326
57143 17915 58329 74...

output:

1624085211
1624085212
1624085213
1624085214
1624085215
1624085216
1624085216
1624085216
1624085216
1624085217
1624085217
1624085218
1624085219
1624085220
1624085221
1624085222
1624085223
1624085223
1624085224
1624085225
1624085226
1624085227
1624085228
1624085228
1624085229
1624085230
1624085231
162...

result:

ok 100001 lines

Test #80:

score: 0
Accepted
time: 240ms
memory: 34044kb

input:

99999 99999 100000
70540 28907 87742 84759
26059 18193 76901 20741
36788 9758 61497 63269
95994 483 95995 483
15012 14502 21436 49853
36476 34784 36476 34785
13546 55347 13547 55347
89348 83740 89349 83740
14121 42073 14121 42074
91159 86669 91159 86669
74322 94736 74323 94736
54727 69885 54728 6988...

output:

40253167
40253168
40253169
40253170
40253171
40253172
40253173
40253174
40253175
40253176
40253177
40253178
40253179
40253180
40253181
40253182
40253183
40253184
40253185
40253186
40253187
40253188
40253189
40253190
40253191
40253192
40253193
40253194
40253195
40253196
40253197
40253198
40253199
402...

result:

ok 100001 lines

Test #81:

score: 0
Accepted
time: 204ms
memory: 33744kb

input:

100000 100000 99998
26396 41761 26397 41761
15933 90649 15933 90649
20209 87612 20210 87612
79683 24403 79684 24404
45443 42351 45443 42352
92826 87618 92826 87618
52229 1818 52230 1819
61627 73516 61628 73516
24746 53059 24746 53060
2098 53867 2099 53867
64947 92453 64948 92453
56728 94496 56729 94...

output:

52887873
52887874
52887875
52887876
52887877
52887878
52887879
52887880
52887881
52887882
52887883
52887884
52887885
52887886
52887887
52887888
52887889
52887890
52887891
52887892
52887893
52887894
52887895
52887896
52887897
52887898
52887899
52887900
52887901
52887902
52887903
52887904
52887905
528...

result:

ok 99999 lines

Test #82:

score: 0
Accepted
time: 219ms
memory: 33588kb

input:

100000 100000 99998
965 47035 965 47035
8321 7838 8322 7839
39855 4577 39856 4577
82969 98145 82970 98145
34424 5877 34424 5878
70565 71222 70566 71223
32706 52658 32707 52658
63985 1614 63985 1614
16262 47046 16263 47047
28748 71496 28748 71497
20414 83043 20414 83043
63526 42790 63526 42790
1310 1...

output:

44501178
44501179
44501180
44501181
44501182
44501183
44501184
44501185
44501186
44501187
44501188
44501189
44501190
44501191
44501192
44501193
44501194
44501195
44501196
44501197
44501198
44501199
44501200
44501201
44501202
44501203
44501204
44501205
44501206
44501207
44501208
44501209
44501210
445...

result:

ok 99999 lines

Test #83:

score: 0
Accepted
time: 215ms
memory: 33812kb

input:

99999 100000 99995
60425 4356 60426 4356
55122 49269 55123 49270
9730 89743 9731 89743
26916 31162 26916 31163
31354 2030 31355 2031
29862 4492 29863 4492
88530 18786 88530 18787
98486 46284 98486 46284
1941 95001 1941 95001
76973 47351 76973 47351
43686 86462 43687 86463
60570 85844 60571 85845
776...

output:

52576591
52576592
52576593
52576594
52576595
52576596
52576597
52576598
52576599
52576600
52576601
52576602
52576603
52576604
52576605
52576606
52576607
52576608
52576609
52576610
52576611
52576612
52576613
52576614
52576615
52576616
52576617
52576618
52576619
52576620
52576621
52576622
52576623
525...

result:

ok 99996 lines

Test #84:

score: 0
Accepted
time: 199ms
memory: 33996kb

input:

100000 99995 100000
66943 70973 66944 70973
13921 21200 13921 21200
43115 86548 43115 86548
78529 93357 78530 93358
99490 90499 99491 90499
71047 54582 71047 54583
72591 2147 72592 2147
61619 9733 61619 9733
79370 48463 79371 48463
8191 50174 8192 50175
49572 49128 49572 49129
7399 2213 7399 2213
42...

output:

59533942
59533943
59533944
59533945
59533944
59533945
59533946
59533947
59533948
59533949
59533950
59533951
59533952
59533953
59533954
59533955
59533956
59533957
59533958
59533959
59533960
59533961
59533962
59533963
59533964
59533965
59533966
59533967
59533968
59533969
59533970
59533971
59533972
595...

result:

ok 100001 lines

Test #85:

score: 0
Accepted
time: 182ms
memory: 33936kb

input:

99999 100000 100000
43449 75835 43449 75836
3343 9787 3344 9788
60600 9585 60600 9586
9680 30603 9680 30603
84450 85461 84450 85462
38683 2998 38684 2998
80751 85174 80752 85175
11926 16424 11926 16424
76159 29975 76160 29976
45012 39160 45013 39160
87481 26741 87481 26742
91635 70531 91636 70531
92...

output:

60554065
60554066
60554067
60554068
60554069
60554070
60554071
60554072
60554073
60554074
60554075
60554076
60554077
60554078
60554079
60554080
60554081
60554082
60554083
60554084
60554085
60554086
60554087
60554088
60554089
60554090
60554091
60554092
60554093
60554094
60554095
60554096
60554097
605...

result:

ok 100001 lines

Test #86:

score: 0
Accepted
time: 182ms
memory: 33920kb

input:

99999 99996 100000
48134 99438 48135 99438
30538 14578 30539 14578
40425 63836 40425 63837
96174 49747 96174 49747
17136 42627 17137 42627
91247 47000 91247 47001
7310 89649 7311 89650
2047 96229 2047 96230
18018 55294 18018 55294
6829 60712 6829 60712
7893 48689 7893 48689
93823 36910 93824 36911
7...

output:

59630391
59630392
59630393
59630394
59630395
59630396
59630397
59630398
59630399
59630400
59630401
59630402
59630403
59630404
59630405
59630406
59630407
59630408
59630409
59630410
59630411
59630412
59630413
59630414
59630415
59630416
59630417
59630418
59630419
59630420
59630421
59630422
59630423
596...

result:

ok 100001 lines

Test #87:

score: 0
Accepted
time: 78ms
memory: 22360kb

input:

25000 0 99996
24915 13542
11783 16970
4881 7084
15899 1695
17999 7084
15899 23185
15899 5608
15899 6714
1363 16970
24915 21038
21747 7084
24915 23703
15899 2877
21507 7084
21951 7084
18668 16970
14550 7084
15899 15677
20288 7084
15899 14761
1593 16970
15899 1407
10720 16970
24915 21882
18692 16970
2...

output:

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
10...

result:

ok 99997 lines

Test #88:

score: 0
Accepted
time: 83ms
memory: 22504kb

input:

25000 0 99996
5848 6064
4698 2173
24286 3396
5848 1780
20346 2173
1421 2173
5848 6213
12202 6054
5848 14071
3847 3396
15850 2173
22691 3396
12202 2663
5848 7307
14039 3396
15836 3396
12202 15991
12202 11999
5848 16981
15981 2173
12202 21068
12202 13262
5848 13259
3237 3396
8698 3396
9972 2173
14316 ...

output:

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
10...

result:

ok 99997 lines

Test #89:

score: 0
Accepted
time: 257ms
memory: 36112kb

input:

100000 100000 100000
73709 2066 73710 2069
27880 91855 27884 91859
86924 30204 86925 30205
94824 58506 94826 58509
14835 27174 14841 73983
12325 50385 12325 50641
48723 27174 48723 73983
33877 99539 33877 99540
42731 69301 42732 69305
21864 65238 21865 65238
56506 27174 56508 73983
7005 18211 7008 1...

output:

3880949640
3880949639
3880949638
3880949639
3880949638
3880949639
3880949640
3880949641
3880949640
3880949639
3880949640
3880949641
3880949642
3880949643
3880949642
3880949641
3880949640
3880949639
3880949638
3880949639
3880949640
3880949641
3880949640
3880949641
3880949640
3880949641
3880949640
388...

result:

ok 100001 lines

Test #90:

score: 0
Accepted
time: 244ms
memory: 37608kb

input:

99997 100000 100000
45761 58634 45761 59964
8341 22836 8343 22840
66403 25567 66404 25570
93272 87663 93273 87664
79402 58582 79402 60009
62165 19925 62168 19929
60380 45857 60381 45860
19954 57892 19954 60676
79844 58635 79845 59961
93651 85452 93652 85453
94226 40823 94228 40823
19192 17894 19195 ...

output:

219858110
219858111
219858112
219858113
219858114
219858115
219858116
219858117
219858118
219858119
219858120
219858121
219858121
219858122
219858123
219858124
219858125
219858126
219858127
219858128
219858129
219858130
219858131
219858132
219858133
219858134
219858135
219858136
219858137
219858138
...

result:

ok 100001 lines

Test #91:

score: 0
Accepted
time: 254ms
memory: 37616kb

input:

99997 100000 100000
24850 33801 24851 33801
83462 18765 83462 19005
39913 30481 39916 30485
38172 18543 38172 19189
58933 18595 58937 19157
7967 18588 7967 19161
10031 15997 10031 21765
56596 23748 56597 23751
1536 18760 1541 19016
7639 78613 7640 78615
91721 16065 91721 21713
46890 18772 46890 1900...

output:

208733498
208733499
208733500
208733501
208733502
208733503
208733504
208733505
208733506
208733507
208733508
208733509
208733510
208733511
208733512
208733513
208733514
208733515
208733516
208733517
208733518
208733519
208733520
208733521
208733522
208733523
208733524
208733525
208733526
208733527
...

result:

ok 100001 lines

Subtask #8:

score: 1
Accepted

Subtask #9:

score: 1
Accepted

Test #20:

score: 1
Accepted
time: 87ms
memory: 21488kb

input:

199 100000 10
66 75 161 177
38 20 189 35
69 134 128 179
35 62 83 72
72 130 77 152
47 38 182 92
17 18 156 193
25 42 132 77
21 36 44 185
17 28 122 44
38 3 168 65
174 29 192 110
29 39 51 127
12 156 188 191
18 9 167 63
74 40 87 71
33 30 163 126
90 72 116 98
39 22 63 35
12 64 121 75
28 51 139 92
5 3 20 3...

output:

19717
19718
19717
19716
19715
19714
19713
19712
19711
19712
19711

result:

ok 11 lines

Test #21:

score: 0
Accepted
time: 84ms
memory: 21700kb

input:

200 100000 10
70 20 119 132
33 34 197 69
11 88 167 172
18 11 193 195
2 10 148 186
17 142 131 184
56 44 169 51
123 93 185 176
4 58 111 96
2 75 197 78
143 16 195 108
7 48 199 90
25 85 154 172
119 31 199 137
44 38 199 193
3 49 192 111
140 35 182 114
86 1 131 179
79 55 167 137
77 26 174 138
35 2 167 172...

output:

19802
19803
19804
19803
19802
19803
19802
19803
19804
19805
19806

result:

ok 11 lines

Test #22:

score: 0
Accepted
time: 89ms
memory: 21732kb

input:

197 100000 10
36 34 184 110
53 118 194 139
48 5 174 181
133 138 178 194
156 65 169 90
5 75 164 137
95 56 163 153
67 83 77 97
29 65 114 102
119 107 124 111
38 63 164 113
48 49 122 126
146 53 165 193
9 19 179 44
74 15 109 22
103 68 186 175
31 141 35 184
79 62 195 115
126 106 147 132
133 98 195 166
119...

output:

8223
8224
8224
8225
8226
8226
8226
8226
8227
8227
8228

result:

ok 11 lines

Test #23:

score: 0
Accepted
time: 84ms
memory: 21756kb

input:

199 100000 10
54 81 191 178
1 52 139 166
119 130 144 194
12 49 144 115
61 70 192 132
15 7 123 186
42 20 118 73
132 7 139 159
177 29 191 194
25 102 29 123
44 48 131 192
127 96 166 158
1 100 25 143
17 94 99 179
83 27 130 137
21 57 192 157
94 20 154 145
16 28 46 151
38 105 113 183
111 37 191 193
66 76 ...

output:

10285
10286
10287
10288
10289
10290
10291
10292
10292
10293
10293

result:

ok 11 lines

Test #24:

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

input:

196 99998 10
183 77 184 78
181 92 182 93
157 112 158 113
165 39 166 40
79 147 79 148
11 15 11 15
140 8 141 9
125 107 126 108
27 154 28 155
177 113 177 113
109 70 110 70
114 64 114 64
146 1 146 1
82 15 82 16
116 30 116 31
135 49 136 49
49 133 49 134
81 34 82 34
185 59 186 59
128 5 128 6
33 159 33 160...

output:

19032
19033
19032
19033
19032
19031
19030
19031
19032
19031
19032

result:

ok 11 lines

Test #25:

score: 0
Accepted
time: 66ms
memory: 21756kb

input:

200 99999 10
80 19 81 19
51 196 51 196
149 34 149 34
6 57 6 58
43 195 44 196
145 119 146 120
25 82 25 83
169 164 170 165
3 86 3 86
83 141 84 142
51 68 52 68
17 143 18 144
63 47 63 48
195 185 195 185
150 120 150 120
27 137 27 138
7 35 7 35
197 131 197 132
125 159 125 159
191 65 191 66
158 118 159 118...

output:

19789
19790
19791
19790
19791
19790
19789
19788
19789
19790
19791

result:

ok 11 lines

Test #26:

score: 0
Accepted
time: 60ms
memory: 22024kb

input:

199 100000 10
191 5 194 5
137 61 141 64
91 46 94 50
50 47 54 49
62 61 65 62
175 12 175 13
52 44 55 44
150 38 150 39
176 44 176 46
90 118 91 120
112 142 114 146
155 164 158 165
111 178 113 182
66 81 67 84
114 2 116 4
88 179 88 180
61 166 62 167
106 65 107 67
149 50 151 52
45 135 47 138
48 126 52 130
...

output:

19798
19797
19798
19799
19800
19800
19800
19799
19800
19799
19798

result:

ok 11 lines

Test #27:

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

input:

200 200 10
134 164 183 164
146 106 159 106
149 148 156 148
146 185 160 185
135 86 180 86
142 184 167 184
148 190 156 190
142 80 163 80
148 155 156 155
148 54 156 54
146 60 159 60
148 7 157 7
144 192 161 192
149 178 156 178
10 85 200 85
137 195 174 195
142 10 162 10
138 16 173 16
135 145 179 145
148 ...

output:

7086
7087
7086
7087
7088
7089
7090
7091
7092
7091
7092

result:

ok 11 lines

Test #28:

score: 0
Accepted
time: 85ms
memory: 21932kb

input:

198 100000 10
61 12 104 104
33 77 82 181
27 26 120 122
46 6 100 127
172 90 190 144
152 73 156 79
6 140 162 196
38 10 64 80
66 112 97 114
38 55 96 160
121 91 192 189
26 160 124 160
41 34 97 131
17 79 170 133
118 75 146 122
168 24 173 53
65 72 72 182
56 64 69 78
172 17 198 97
67 103 163 115
24 84 71 1...

output:

19572
19571
19570
19571
19572
19571
19572
19571
19572
19573
19574

result:

ok 11 lines

Test #29:

score: 0
Accepted
time: 77ms
memory: 21632kb

input:

200 100000 10
16 86 117 173
118 6 133 188
7 116 177 199
10 59 179 199
2 120 145 128
32 63 150 185
46 31 160 147
124 3 172 182
13 20 132 163
18 10 171 182
104 17 179 199
14 83 198 112
117 125 180 150
43 124 148 177
147 6 189 187
33 15 192 77
11 44 168 191
68 91 75 145
29 3 195 117
4 5 127 181
109 12 ...

output:

19893
19892
19893
19892
19891
19892
19893
19894
19895
19894
19895

result:

ok 11 lines

Test #30:

score: 0
Accepted
time: 77ms
memory: 21464kb

input:

195 99997 10
46 43 69 150
163 5 188 143
15 40 111 186
5 10 150 193
83 127 156 137
86 90 109 190
6 63 175 133
8 66 188 189
143 68 178 183
79 82 138 111
42 83 177 91
11 12 80 194
34 12 61 172
37 54 166 188
10 26 168 136
78 11 82 186
129 20 142 121
105 7 192 83
13 12 195 186
46 11 184 138
104 38 170 16...

output:

18794
18793
18794
18793
18792
18793
18792
18791
18792
18793
18794

result:

ok 11 lines

Test #31:

score: 0
Accepted
time: 85ms
memory: 21604kb

input:

200 100000 10
31 105 195 145
93 127 182 144
28 133 144 163
17 140 84 171
38 29 185 136
19 46 55 126
68 7 91 133
83 98 171 184
35 94 183 161
175 50 199 129
44 78 151 133
110 71 167 172
111 49 180 169
50 84 161 100
87 63 195 73
57 64 91 156
11 99 105 180
36 88 94 187
93 116 137 169
6 174 134 174
42 15...

output:

13845
13846
13846
13847
13848
13848
13848
13848
13848
13849
13849

result:

ok 11 lines

Test #32:

score: 0
Accepted
time: 79ms
memory: 21764kb

input:

198 99996 10
48 45 128 86
17 61 141 145
92 50 140 151
124 21 167 157
102 13 182 172
81 69 173 130
62 93 146 197
28 25 39 150
22 73 118 147
15 13 125 44
21 50 82 180
26 69 53 119
21 22 114 59
57 63 82 172
115 51 193 172
40 26 190 95
106 112 172 189
3 48 120 120
134 16 172 132
18 5 191 89
77 11 142 65...

output:

8964
8964
8964
8965
8966
8967
8968
8969
8970
8971
8971

result:

ok 11 lines

Test #33:

score: 0
Accepted
time: 60ms
memory: 21820kb

input:

199 99996 10
153 175 153 175
142 47 142 47
3 89 3 89
151 88 151 88
100 195 100 195
179 14 180 14
22 77 23 77
121 148 121 149
28 71 29 71
132 53 133 54
14 28 14 29
52 113 52 114
117 60 118 61
174 146 174 146
54 168 54 168
72 40 72 41
138 45 138 45
101 68 101 68
26 120 27 120
109 137 109 137
30 69 31 ...

output:

19773
19774
19773
19774
19775
19776
19777
19778
19779
19780
19781

result:

ok 11 lines

Test #34:

score: 0
Accepted
time: 65ms
memory: 21916kb

input:

200 99998 10
184 24 184 24
96 2 97 3
99 176 100 177
80 79 80 80
78 24 79 24
77 158 78 158
85 90 86 91
112 69 113 69
50 107 51 107
6 29 7 29
170 65 170 65
17 164 18 164
129 77 129 77
188 197 189 197
83 91 84 91
180 14 180 15
171 55 171 55
47 5 47 5
122 59 122 60
9 33 9 33
175 145 176 145
185 83 186 8...

output:

19866
19867
19866
19867
19868
19867
19868
19867
19866
19865
19866

result:

ok 11 lines

Test #35:

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

input:

200 100000 10
175 91 177 95
177 88 181 91
34 45 35 49
76 161 80 164
142 195 145 197
174 55 178 59
76 44 80 46
88 165 89 165
140 178 143 182
82 110 86 111
83 161 85 163
79 153 82 154
12 44 13 45
101 77 101 81
177 194 179 198
7 25 8 25
66 98 69 101
41 96 44 98
40 124 43 125
42 120 43 121
113 100 116 1...

output:

19820
19819
19818
19817
19816
19817
19818
19819
19818
19819
19820

result:

ok 11 lines

Test #36:

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

input:

197 200 10
126 48 126 53
9 49 9 52
156 30 156 71
124 41 124 57
148 40 148 60
195 48 195 52
29 1 29 106
85 38 85 64
49 47 49 53
121 25 121 76
145 1 145 102
151 49 151 52
96 40 96 62
20 41 20 57
40 27 40 73
131 40 131 63
109 31 109 71
13 48 13 53
1 38 1 67
122 32 122 70
37 41 37 56
118 1 118 197
117 4...

output:

7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966

result:

ok 11 lines

Test #37:

score: 0
Accepted
time: 110ms
memory: 22100kb

input:

1998 100000 4996
775 369 991 1761
1602 537 1960 1167
361 1256 1522 1569
261 322 1165 1934
39 286 1996 1996
260 994 1739 1651
600 1043 1368 1593
679 1167 1481 1338
149 21 959 1234
1096 348 1965 1246
1827 933 1834 1443
418 341 490 637
76 518 1974 1492
385 1501 390 1608
153 353 1689 459
1451 402 1549 1...

output:

1995864
1995863
1995862
1995863
1995864
1995863
1995864
1995863
1995862
1995863
1995864
1995865
1995864
1995865
1995866
1995865
1995864
1995863
1995864
1995863
1995862
1995863
1995864
1995863
1995862
1995863
1995862
1995863
1995862
1995861
1995860
1995861
1995860
1995859
1995858
1995857
1995856
1995...

result:

ok 4997 lines

Test #38:

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

input:

2000 100000 4998
16 682 230 1431
491 196 1355 1519
511 285 730 1688
1193 693 1970 898
217 24 772 488
151 1004 1357 1329
586 674 1426 1141
420 743 1072 1747
144 732 479 965
676 24 1803 930
65 578 1966 774
91 1537 1768 1804
693 1060 1675 1291
775 257 1775 1479
255 234 763 866
1 1269 758 1805
194 236 2...

output:

1999850
1999849
1999850
1999851
1999852
1999853
1999852
1999851
1999852
1999853
1999852
1999851
1999852
1999853
1999854
1999855
1999854
1999853
1999852
1999853
1999854
1999855
1999854
1999855
1999854
1999853
1999854
1999855
1999856
1999855
1999854
1999853
1999852
1999851
1999852
1999853
1999852
1999...

result:

ok 4999 lines

Test #39:

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

input:

2000 100000 5000
71 166 788 503
1461 1031 1521 1851
17 17 1977 148
122 1521 806 1700
583 1438 1133 1504
1127 478 1190 849
371 894 549 1967
7 135 693 1086
155 478 1123 798
203 1451 1433 1948
32 924 619 1767
119 496 535 1777
47 506 366 1714
781 637 1338 1878
309 444 1300 1974
147 755 1788 1976
1245 55...

output:

1999300
1999301
1999302
1999301
1999300
1999301
1999300
1999299
1999298
1999297
1999298
1999297
1999296
1999295
1999294
1999295
1999294
1999293
1999294
1999295
1999296
1999295
1999294
1999295
1999294
1999293
1999292
1999291
1999290
1999289
1999288
1999287
1999286
1999287
1999286
1999287
1999286
1999...

result:

ok 5001 lines

Test #40:

score: 0
Accepted
time: 108ms
memory: 22468kb

input:

2000 100000 5000
471 898 1154 1562
165 1275 1527 1492
454 566 1978 1692
30 502 1703 1918
374 380 1617 562
265 989 1758 1529
806 261 1943 1252
256 79 360 1717
178 126 1987 1854
548 175 1981 1946
455 401 1157 1762
262 105 1460 514
854 667 1053 1783
227 421 746 1361
613 118 1314 1399
303 202 1995 379
7...

output:

1999203
1999204
1999203
1999202
1999201
1999200
1999201
1999202
1999201
1999200
1999201
1999202
1999203
1999204
1999205
1999206
1999207
1999208
1999209
1999208
1999209
1999210
1999211
1999212
1999211
1999212
1999213
1999212
1999211
1999212
1999211
1999212
1999211
1999210
1999209
1999210
1999211
1999...

result:

ok 5001 lines

Test #41:

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

input:

2000 100000 5000
1156 723 1376 1366
46 522 1943 1861
1059 733 1878 1569
129 1141 1908 1978
590 146 1744 984
16 584 1338 1506
466 257 1066 760
402 896 470 1910
769 1119 1418 1955
53 675 1585 1974
520 1411 1749 1792
847 124 1787 1817
193 658 1402 1429
79 496 1531 996
1798 104 1935 1636
95 1418 1989 18...

output:

1999333
1999332
1999333
1999334
1999335
1999336
1999337
1999338
1999339
1999338
1999337
1999336
1999337
1999338
1999339
1999338
1999339
1999338
1999337
1999336
1999335
1999334
1999333
1999334
1999335
1999336
1999335
1999336
1999337
1999336
1999337
1999338
1999337
1999336
1999335
1999336
1999337
1999...

result:

ok 5001 lines

Test #42:

score: 0
Accepted
time: 120ms
memory: 22460kb

input:

1998 100000 5000
118 51 1704 1117
209 129 1922 1898
483 357 1982 1769
5 136 1545 1701
227 954 1851 1713
36 332 1782 1631
43 1360 1816 1486
519 388 1597 1214
817 257 881 1150
11 56 1835 1181
136 142 1753 1417
1075 577 1893 1974
38 5 1839 1715
25 996 489 1326
95 888 1132 1647
25 1439 1987 1782
1062 39...

output:

1995146
1995145
1995144
1995143
1995142
1995141
1995142
1995143
1995144
1995145
1995146
1995147
1995148
1995149
1995148
1995147
1995146
1995147
1995146
1995147
1995148
1995147
1995148
1995147
1995148
1995149
1995148
1995147
1995148
1995147
1995148
1995149
1995148
1995149
1995148
1995147
1995146
1995...

result:

ok 5001 lines

Test #43:

score: 0
Accepted
time: 126ms
memory: 22260kb

input:

1998 100000 4997
1379 880 1630 1549
119 731 1645 1876
1272 414 1858 1877
998 17 1449 1519
406 1567 1822 1801
512 1122 1025 1795
640 262 1758 1676
1651 246 1889 1603
672 300 1235 505
307 191 1866 1050
156 80 1131 1574
1116 1789 1703 1820
582 363 660 1522
336 882 1676 1973
860 653 1804 701
194 270 751...

output:

1363868
1363869
1363870
1363870
1363871
1363872
1363873
1363874
1363875
1363876
1363877
1363878
1363878
1363878
1363878
1363878
1363878
1363879
1363880
1363881
1363881
1363882
1363882
1363883
1363883
1363884
1363885
1363886
1363887
1363887
1363888
1363889
1363889
1363889
1363889
1363890
1363891
1363...

result:

ok 4998 lines

Test #44:

score: 0
Accepted
time: 125ms
memory: 22468kb

input:

1997 100000 5000
706 991 1623 1395
684 834 1194 1819
564 283 1038 977
483 888 1472 1562
239 604 630 805
882 136 1954 1129
278 357 1770 882
470 1575 1365 1833
235 164 1657 1660
610 1357 1759 1870
1074 1010 1335 1792
6 1634 1772 1658
667 1465 1458 1729
1539 1611 1872 1639
57 1141 1053 1976
32 524 328 ...

output:

1243234
1243235
1243236
1243236
1243237
1243237
1243238
1243239
1243239
1243240
1243241
1243241
1243242
1243243
1243243
1243244
1243244
1243245
1243246
1243246
1243246
1243246
1243247
1243247
1243248
1243248
1243249
1243250
1243251
1243252
1243253
1243254
1243255
1243256
1243257
1243258
1243259
1243...

result:

ok 5001 lines

Test #45:

score: 0
Accepted
time: 120ms
memory: 22372kb

input:

1996 100000 5000
663 1036 1106 1416
335 968 1442 1649
794 189 1126 1835
254 169 488 616
233 536 1046 1804
453 139 1805 293
592 371 977 1714
1474 499 1533 1666
1055 109 1358 695
156 1349 1329 1699
166 151 1728 565
275 1858 836 1969
536 257 1414 662
53 1217 1597 1848
430 605 1441 1762
34 1472 1988 180...

output:

1034408
1034409
1034410
1034411
1034411
1034412
1034412
1034413
1034414
1034415
1034416
1034417
1034418
1034419
1034420
1034421
1034422
1034423
1034424
1034424
1034425
1034426
1034426
1034427
1034427
1034428
1034429
1034430
1034431
1034431
1034432
1034432
1034433
1034434
1034435
1034436
1034437
1034...

result:

ok 5001 lines

Test #46:

score: 0
Accepted
time: 149ms
memory: 22388kb

input:

1996 99997 5000
397 1167 590 1351
736 594 1713 1103
62 1679 450 1690
838 90 1790 1249
452 1871 1205 1955
330 2 651 476
343 313 1719 1292
1529 77 1716 535
109 163 308 1836
379 348 1663 954
1059 85 1124 1589
140 591 1388 1863
1032 677 1877 1471
1324 282 1554 1598
251 441 1672 1514
741 133 825 1605
832...

output:

818387
818388
818388
818389
818389
818390
818391
818392
818393
818394
818394
818394
818395
818395
818396
818396
818397
818398
818399
818399
818400
818401
818402
818403
818404
818405
818406
818407
818408
818409
818410
818411
818412
818412
818413
818414
818415
818416
818416
818417
818418
818419
818420...

result:

ok 5001 lines

Test #47:

score: 0
Accepted
time: 9ms
memory: 18244kb

input:

1996 700 5000
42 681 225 857
1817 1217 1818 1217
1342 1920 1343 1921
42 1 1305 1995
38 6 39 7
35 679 1772 759
35 681 1772 857
796 120 1119 1852
41 1180 799 1358
1107 1835 1108 1835
772 1297 773 1297
225 218 368 1433
132 753 820 1853
41 1798 799 1865
9 216 9 217
225 159 368 643
66 749 1134 755
792 12...

output:

229558
229559
229560
229561
229562
229563
229564
229565
229566
229567
229568
229569
229570
229571
229572
229573
229574
229575
229576
229577
229578
229579
229580
229581
229582
229583
229584
229585
229586
229587
229588
229589
229590
229591
229592
229593
229594
229595
229596
229597
229598
229599
229600...

result:

ok 5001 lines

Test #48:

score: 0
Accepted
time: 9ms
memory: 18268kb

input:

1996 697 5000
291 520 292 521
1100 494 1101 495
210 625 1118 1801
238 1817 404 1821
1913 1098 1914 1098
199 262 199 262
639 344 639 344
609 377 1610 896
237 1018 1117 1386
1582 998 1582 999
89 650 604 1564
730 161 731 162
1207 1194 1208 1194
94 1195 957 1256
875 1906 876 1907
94 377 957 896
926 1838...

output:

217225
217226
217227
217228
217228
217229
217230
217231
217232
217233
217234
217235
217236
217237
217238
217239
217240
217241
217242
217243
217244
217245
217246
217247
217248
217249
217250
217251
217252
217253
217254
217255
217255
217256
217257
217258
217259
217260
217261
217262
217263
217264
217265...

result:

ok 5001 lines

Test #49:

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

input:

2000 97 5000
183 488 183 489
344 599 345 600
929 1521 930 1521
742 1588 742 1589
1046 1323 1047 1324
1359 586 1360 586
359 411 360 412
933 1096 934 1096
1503 1388 1503 1389
1992 96 1992 97
535 1406 536 1406
1606 632 1606 632
1526 1940 1527 1941
1660 1798 1661 1798
1607 186 1608 186
1638 275 1639 275...

output:

119192
119193
119194
119195
119196
119197
119198
119199
119200
119201
119202
119203
119204
119205
119206
119207
119208
119209
119210
119211
119212
119213
119214
119215
119216
119217
119218
119219
119220
119221
119222
119223
119222
119223
119224
119225
119226
119227
119226
119227
119228
119229
119230...

result:

ok 5001 lines

Test #50:

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

input:

1996 100 5000
1375 1591 1375 1591
1487 1804 1487 1805
232 2 1036 1996
766 347 766 348
1174 520 1175 521
1966 1389 1967 1390
1151 326 1151 326
911 617 911 617
552 611 553 611
871 1413 871 1413
991 1711 992 1711
661 1651 662 1652
62 1638 63 1639
1243 121 1243 122
1011 1380 1012 1380
1634 1139 1635 113...

output:

120870
120871
120872
120873
120874
120875
120876
120877
120878
120879
120880
120881
120882
120883
120884
120885
120886
120887
120888
120889
120890
120891
120892
120893
120894
120895
120896
120897
120898
120899
120900
120901
120900
120901
120902
120903
120904
120905
120906
120907
120908
120909
120910...

result:

ok 5001 lines

Test #51:

score: 0
Accepted
time: 85ms
memory: 22048kb

input:

2000 100000 5000
9 1029 10 1032
184 803 187 803
1844 844 1847 845
105 1415 107 1416
1343 637 1346 637
108 1674 111 1675
1525 1383 1526 1387
690 1498 693 1499
1555 261 1559 264
1494 693 1495 695
104 1108 105 1112
516 1862 517 1862
673 1814 674 1814
1358 240 1360 243
124 1984 125 1988
130 279 134 283
...

output:

1819251
1819252
1819253
1819254
1819253
1819254
1819253
1819254
1819255
1819254
1819253
1819252
1819251
1819250
1819249
1819248
1819247
1819246
1819245
1819244
1819245
1819246
1819245
1819246
1819247
1819246
1819247
1819248
1819247
1819248
1819249
1819250
1819249
1819248
1819249
1819250
1819251
1819...

result:

ok 5001 lines

Test #52:

score: 0
Accepted
time: 79ms
memory: 22024kb

input:

1998 100000 5000
680 443 683 447
714 120 718 121
346 928 346 931
58 1256 61 1260
276 1717 279 1717
908 1118 912 1122
902 436 902 436
1385 147 1386 148
317 1488 319 1491
1729 1247 1730 1250
1023 1466 1027 1469
1183 1706 1186 1710
184 848 188 851
1041 33 1044 37
590 423 591 425
927 655 929 656
1790 17...

output:

1786815
1786816
1786817
1786818
1786817
1786816
1786815
1786816
1786815
1786816
1786815
1786814
1786815
1786814
1786815
1786816
1786817
1786816
1786815
1786816
1786817
1786818
1786817
1786818
1786819
1786820
1786819
1786820
1786819
1786818
1786817
1786818
1786819
1786820
1786819
1786820
1786821
1786...

result:

ok 5001 lines

Test #53:

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

input:

2000 2000 5000
135 327 153 327
136 1780 152 1780
85 1377 209 1377
135 1886 153 1886
137 429 150 429
136 1831 152 1831
127 995 170 995
136 1975 152 1975
128 571 170 571
137 1615 149 1615
135 193 152 193
134 772 157 772
127 1734 170 1734
135 515 154 515
122 1006 173 1006
2 1707 273 1707
136 783 152 78...

output:

231628
231629
231630
231631
231632
231633
231633
231634
231635
231634
231635
231636
231637
231638
231637
231638
231639
231640
231641
231642
231643
231644
231645
231646
231647
231648
231649
231650
231651
231652
231653
231654
231655
231656
231657
231658
231659
231660
231661
231661
231662
231663
231664...

result:

ok 5001 lines

Test #54:

score: 0
Accepted
time: 5ms
memory: 18240kb

input:

2000 2000 5000
346 1778 435 1778
342 1353 439 1353
387 1793 399 1793
387 1029 398 1029
368 138 415 138
344 277 435 277
387 971 400 971
373 558 409 558
387 1906 397 1906
385 684 400 684
374 1527 407 1527
371 485 414 485
281 1859 502 1859
375 1409 404 1409
372 1579 411 1579
387 713 400 713
341 1909 44...

output:

202881
202882
202883
202884
202885
202886
202886
202887
202888
202889
202890
202891
202892
202893
202894
202895
202896
202897
202898
202899
202900
202901
202902
202903
202904
202905
202906
202907
202908
202909
202910
202910
202911
202912
202913
202914
202915
202916
202917
202918
202919
202920
202921...

result:

ok 5001 lines

Test #55:

score: 0
Accepted
time: 953ms
memory: 65404kb

input:

300000 300000 0
111286 8433 181522 208880
103975 18048 166307 265794
219191 206072 231168 244635
39203 31482 254123 175874
210327 170835 224455 174259
23607 115325 298465 184339
164969 165055 165512 245381
63858 179069 225059 289296
80109 35085 187602 236259
110496 211546 115434 226722
195501 118136...

output:

44999578196

result:

ok single line: '44999578196'

Test #56:

score: 0
Accepted
time: 973ms
memory: 65360kb

input:

299998 299998 0
102929 141474 262240 275854
7086 16380 260617 159145
43899 146614 296374 286631
122612 67308 181921 136141
87968 47582 144236 87625
28575 135320 128152 151313
111824 42986 177512 291594
271524 63659 278281 80217
198670 28482 245550 209186
82312 15280 217306 25682
51535 169379 257124 ...

output:

44998583998

result:

ok single line: '44998583998'

Test #57:

score: 0
Accepted
time: 972ms
memory: 64836kb

input:

300000 299997 0
75788 244 189690 292148
33796 30582 250655 194450
118103 29514 259835 299876
70118 46710 236542 255922
155643 181414 240901 226800
141101 60414 284918 212623
145900 15996 235854 163300
104524 78694 295257 238361
11774 1579 189361 285466
76567 102999 245010 218769
50037 160933 176445 ...

output:

44999752677

result:

ok single line: '44999752677'

Test #58:

score: 0
Accepted
time: 771ms
memory: 65216kb

input:

300000 300000 0
203824 47881 266431 67968
130229 25145 182369 258589
2211 19679 191032 165814
49499 49008 180834 222388
69101 72358 287213 270479
164068 31510 277206 135165
96014 149516 224789 250953
59891 222514 87051 260460
14245 70231 172878 288296
54329 4949 196165 104230
37679 129463 116432 270...

output:

16917652389

result:

ok single line: '16917652389'

Test #59:

score: 0
Accepted
time: 766ms
memory: 65296kb

input:

299997 299997 0
38553 49361 62274 299098
56714 196188 116116 250373
63981 30360 267237 196687
42436 33061 285143 280010
52849 289514 171736 297589
173023 83886 278388 256183
120161 142483 144578 239181
147151 109153 291263 207746
80577 252288 285200 254047
59455 17712 157228 97886
9054 25528 259085 ...

output:

28987248085

result:

ok single line: '28987248085'

Test #60:

score: 0
Accepted
time: 657ms
memory: 63956kb

input:

299998 299999 0
136906 209617 222826 259970
107847 223242 180164 249501
75085 93681 282599 269781
214618 94513 214618 94513
173941 49709 256127 85004
109472 169299 162608 200318
85046 82330 85047 82330
52146 164851 138852 166662
142483 129367 194165 257620
35182 17978 263712 42933
234451 28547 25397...

output:

12915873389

result:

ok single line: '12915873389'

Test #61:

score: 0
Accepted
time: 660ms
memory: 63932kb

input:

300000 300000 0
22694 62083 79385 167560
86018 60503 180906 105709
104789 249209 104790 249209
202743 198404 230786 288343
32630 173187 32630 173188
138777 47283 259205 231701
92104 59526 278723 104214
22694 204004 79385 270369
121942 271667 231746 291394
25679 198404 187558 288343
283741 190828 283...

output:

12547832155

result:

ok single line: '12547832155'

Test #62:

score: 0
Accepted
time: 533ms
memory: 64428kb

input:

300000 300000 0
43686 139899 43687 139899
243599 286829 243602 286833
262212 73355 262214 73358
121008 34843 121008 34845
66500 264304 66503 264308
137029 68362 137030 300000
81811 168644 81812 168647
243048 259594 243051 259594
181977 244475 181978 244479
79972 68362 79973 300000
155653 45711 15565...

output:

26490590162

result:

ok single line: '26490590162'

Test #63:

score: 0
Accepted
time: 536ms
memory: 66244kb

input:

300000 300000 0
120392 202011 120392 221961
83963 207240 83963 216854
35060 97059 35062 97059
172854 210950 172854 213292
91022 223915 91022 223916
40936 211826 40937 212434
295283 64621 295286 64622
208562 157630 208562 157630
12000 186110 12000 186112
298339 211845 298341 212413
175492 211856 1754...

output:

884425938

result:

ok single line: '884425938'

Test #64:

score: 0
Accepted
time: 979ms
memory: 65368kb

input:

299999 300000 0
84800 82432 177603 104711
157235 89546 257890 161794
78116 55592 83881 150522
35148 135687 129164 232070
28820 57482 225080 63117
29409 141975 167249 224302
198440 188133 240740 202788
20552 50405 137348 159766
167048 132287 297967 138665
72493 89918 294575 99642
166385 51782 260778 ...

output:

44999266089

result:

ok single line: '44999266089'

Test #65:

score: 0
Accepted
time: 941ms
memory: 64948kb

input:

300000 300000 0
11001 7159 288326 238864
48326 127848 246841 214393
110 186314 287714 198137
99090 9186 260535 191167
179560 104826 290874 219410
20131 65050 293203 165782
10888 2886 294107 293954
5138 2039 236325 162763
54843 200962 275274 250742
47948 1538 286926 127470
7960 184197 282852 283562
2...

output:

44999993845

result:

ok single line: '44999993845'

Test #66:

score: 0
Accepted
time: 984ms
memory: 64900kb

input:

300000 300000 0
28304 67592 239881 292613
38502 117854 139355 250251
10889 9232 297019 272392
127980 7362 293260 285969
94604 22060 246891 187073
116624 4639 281745 169604
211316 214237 287010 247809
19724 208184 263872 232858
62575 15772 249165 230360
21875 29992 168749 133382
762 38417 169708 2541...

output:

44999654335

result:

ok single line: '44999654335'

Test #67:

score: 0
Accepted
time: 788ms
memory: 65336kb

input:

299996 300000 0
485 151352 27958 200228
123697 222681 217554 252206
23531 74229 145827 162737
140681 149943 198268 290412
153458 91630 225172 296050
27062 21613 99891 272217
134553 89228 257202 228168
57640 174186 226513 253474
105346 26806 277054 290688
8899 26963 89037 235547
131943 41371 168915 2...

output:

18669308008

result:

ok single line: '18669308008'

Test #68:

score: 0
Accepted
time: 767ms
memory: 65336kb

input:

299996 299999 0
164122 26570 273978 252342
33266 226628 205980 280672
222644 85229 298235 237316
139009 11964 260146 183905
80284 34058 265776 269073
160187 170541 294119 277162
111120 197728 154824 198664
35946 81476 58447 235618
29311 199740 255178 282584
169289 106549 276344 236412
199692 5215 27...

output:

21773906264

result:

ok single line: '21773906264'

Test #69:

score: 0
Accepted
time: 521ms
memory: 65200kb

input:

299997 299995 0
275957 87983 275958 87984
1048 240576 1048 240577
22681 286555 22682 286555
265690 51753 265691 51754
233703 277810 233703 277810
113735 245010 113736 245011
183346 290743 183347 290743
190567 1254 190567 1254
277556 219955 277556 219956
180618 183462 180618 183462
50682 189353 50682...

output:

13075911472

result:

ok single line: '13075911472'

Test #70:

score: 0
Accepted
time: 685ms
memory: 63988kb

input:

299998 299995 0
13647 293587 13648 293588
50504 168453 50514 194709
168968 116835 218711 139865
78742 97296 78854 194787
13923 97432 210284 167115
71735 253178 71736 253179
94038 19590 291001 218710
50600 2548 230193 80057
211000 63452 298292 293987
166322 193531 262816 214989
33367 24953 136557 353...

output:

12956833433

result:

ok single line: '12956833433'

Test #71:

score: 0
Accepted
time: 540ms
memory: 64428kb

input:

299998 300000 0
182131 56112 182131 231882
2952 74406 2952 213651
189689 2365 189690 285760
89266 277537 89266 277541
211269 56112 211269 231882
131758 118381 131759 118381
12326 175932 12326 175932
74239 257051 74239 257054
84311 183451 84314 183452
24498 297557 24498 297559
111835 29199 111835 292...

output:

42882166068

result:

ok single line: '42882166068'

Test #72:

score: 0
Accepted
time: 552ms
memory: 67964kb

input:

300000 300000 0
249128 243469 249132 243473
152427 260018 153400 260019
151868 50523 153977 50523
152676 11924 153161 11927
90541 129896 90545 129896
150979 70062 154876 70062
152646 240094 153181 240094
152393 190054 153424 190054
126896 83036 126896 83038
152642 81521 153185 81521
282405 235836 28...

output:

748169837

result:

ok single line: '748169837'

Test #73:

score: 0
Accepted
time: 54ms
memory: 22928kb

input:

6 100000 100000
1 1 6 2
3 1 5 5
2 3 2 5
1 3 6 3
1 6 3 6
2 4 4 4
3 2 5 2
1 3 2 4
2 2 2 4
3 2 5 6
1 2 2 5
3 3 4 5
5 2 5 6
5 1 6 5
1 1 4 2
1 5 6 6
5 1 6 6
2 5 3 5
6 1 6 2
4 5 5 5
1 1 5 3
1 1 6 2
1 1 3 3
1 2 6 4
1 5 4 6
5 1 6 2
2 1 3 6
1 2 3 6
1 2 2 3
1 2 6 4
1 3 5 6
1 1 6 2
2 4 5 5
1 3 5 4
2 1 3 1
2 1 ...

output:

16
17
18
17
18
17
18
17
16
15
14
15
16
17
16
17
18
17
18
17
18
17
18
17
18
17
16
15
14
15
16
17
18
17
18
17
16
17
16
15
16
15
14
15
14
15
16
15
16
17
18
17
18
17
18
17
16
17
16
15
16
15
14
13
14
13
14
15
14
15
16
15
14
15
16
17
16
17
18
17
18
17
16
15
16
15
16
15
14
15
16
15
14
15
16
15
16
17
16
15
...

result:

ok 100001 lines

Test #74:

score: 0
Accepted
time: 66ms
memory: 22792kb

input:

8 100000 99999
2 1 7 2
2 4 5 7
3 3 6 6
2 3 4 5
5 1 8 6
2 1 7 2
5 1 6 1
2 2 7 4
3 3 7 4
3 2 8 6
6 2 6 5
3 4 5 8
5 4 8 5
4 5 8 6
4 2 6 4
4 6 7 8
1 2 4 4
2 5 5 8
8 1 8 8
7 4 7 7
4 4 5 7
4 3 6 6
6 4 6 5
6 3 6 3
1 8 3 8
2 2 5 3
3 5 7 5
5 1 8 2
3 1 6 3
2 3 4 6
2 4 7 7
4 5 8 6
6 5 7 8
7 3 8 6
4 3 7 7
3 3 6...

output:

31
30
31
30
29
30
31
30
31
30
29
30
31
32
31
32
31
30
29
28
27
26
27
28
29
28
27
28
29
30
31
32
31
32
31
32
31
32
31
32
31
32
31
32
31
30
29
30
29
30
31
30
29
28
29
28
29
30
31
30
31
32
31
32
31
32
31
32
31
32
31
30
29
28
29
28
29
28
27
26
25
26
27
28
29
28
27
26
25
26
25
24
25
26
27
28
29
28
29
30
...

result:

ok 100000 lines

Test #75:

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

input:

100000 99995 100000
28548 88222 50513 99778
10767 52833 72182 65632
41874 21183 77539 52474
35315 11585 63585 70632
22040 61978 98576 79712
24029 11410 60547 54197
42535 3014 51034 96911
14178 35071 16032 57621
6503 17763 85601 50948
23854 40696 55517 91138
22111 34809 48872 51336
14650 33202 21826 ...

output:

4999484672
4999484673
4999484672
4999484671
4999484672
4999484673
4999484674
4999484675
4999484676
4999484675
4999484676
4999484675
4999484674
4999484673
4999484674
4999484675
4999484674
4999484675
4999484676
4999484675
4999484674
4999484673
4999484672
4999484671
4999484670
4999484671
4999484670
499...

result:

ok 100001 lines

Test #76:

score: 0
Accepted
time: 343ms
memory: 37132kb

input:

99998 100000 100000
6276 26104 98433 52334
56299 11637 90527 93788
11731 6653 97445 22567
3320 36060 77219 77134
5512 26749 26522 58676
48916 22644 54058 91667
43275 53174 68736 59156
19623 16527 70018 61062
8294 64841 97635 95092
10727 15235 94836 76298
39183 15574 75952 58154
8773 14519 93551 9525...

output:

4999791601
4999791600
4999791601
4999791602
4999791601
4999791600
4999791599
4999791598
4999791599
4999791598
4999791599
4999791598
4999791597
4999791598
4999791599
4999791598
4999791599
4999791598
4999791597
4999791596
4999791597
4999791596
4999791597
4999791598
4999791599
4999791600
4999791599
499...

result:

ok 100001 lines

Test #77:

score: 0
Accepted
time: 341ms
memory: 37208kb

input:

99995 99995 100000
29299 20015 80842 81598
66476 35798 83452 97324
24652 65150 98297 69124
61067 32211 66313 40379
7378 34024 55096 97557
6226 28403 91560 93841
22310 27083 64718 94228
18416 65694 64856 84346
15012 54562 84374 69845
10500 20589 97645 98583
57385 29281 83785 98061
48276 8424 54263 86...

output:

4999476661
4999476662
4999476661
4999476660
4999476659
4999476660
4999476661
4999476660
4999476659
4999476658
4999476659
4999476660
4999476659
4999476658
4999476659
4999476658
4999476659
4999476660
4999476659
4999476660
4999476659
4999476660
4999476659
4999476660
4999476659
4999476660
4999476659
499...

result:

ok 100001 lines

Test #78:

score: 0
Accepted
time: 297ms
memory: 36560kb

input:

99997 100000 100000
24230 33175 42168 91716
4311 19778 78295 92977
10493 66597 65558 76353
11506 41875 92131 86794
9248 39862 71950 71226
50952 14019 90724 39380
501 13598 10796 16444
5455 11737 71069 39740
8102 20965 33640 21648
52522 1536 71415 84257
10917 35725 57850 85240
55948 48633 92970 55633...

output:

2474378013
2474378014
2474378015
2474378016
2474378017
2474378018
2474378019
2474378019
2474378019
2474378020
2474378021
2474378022
2474378023
2474378024
2474378025
2474378026
2474378027
2474378027
2474378028
2474378028
2474378029
2474378030
2474378031
2474378031
2474378032
2474378033
2474378034
247...

result:

ok 100001 lines

Test #79:

score: 0
Accepted
time: 269ms
memory: 36636kb

input:

100000 100000 100000
18734 38655 81380 83187
9176 3759 96764 35334
98139 17498 98660 98440
77519 13827 80881 34519
2845 9757 76638 82601
1016 95371 97272 97424
16499 31784 40077 77149
17747 27069 82855 75289
72293 37869 85947 83697
15044 50653 84293 66164
10366 22744 84320 80326
57143 17915 58329 74...

output:

1624085211
1624085212
1624085213
1624085214
1624085215
1624085216
1624085216
1624085216
1624085216
1624085217
1624085217
1624085218
1624085219
1624085220
1624085221
1624085222
1624085223
1624085223
1624085224
1624085225
1624085226
1624085227
1624085228
1624085228
1624085229
1624085230
1624085231
162...

result:

ok 100001 lines

Test #80:

score: 0
Accepted
time: 227ms
memory: 33988kb

input:

99999 99999 100000
70540 28907 87742 84759
26059 18193 76901 20741
36788 9758 61497 63269
95994 483 95995 483
15012 14502 21436 49853
36476 34784 36476 34785
13546 55347 13547 55347
89348 83740 89349 83740
14121 42073 14121 42074
91159 86669 91159 86669
74322 94736 74323 94736
54727 69885 54728 6988...

output:

40253167
40253168
40253169
40253170
40253171
40253172
40253173
40253174
40253175
40253176
40253177
40253178
40253179
40253180
40253181
40253182
40253183
40253184
40253185
40253186
40253187
40253188
40253189
40253190
40253191
40253192
40253193
40253194
40253195
40253196
40253197
40253198
40253199
402...

result:

ok 100001 lines

Test #81:

score: 0
Accepted
time: 205ms
memory: 33908kb

input:

100000 100000 99998
26396 41761 26397 41761
15933 90649 15933 90649
20209 87612 20210 87612
79683 24403 79684 24404
45443 42351 45443 42352
92826 87618 92826 87618
52229 1818 52230 1819
61627 73516 61628 73516
24746 53059 24746 53060
2098 53867 2099 53867
64947 92453 64948 92453
56728 94496 56729 94...

output:

52887873
52887874
52887875
52887876
52887877
52887878
52887879
52887880
52887881
52887882
52887883
52887884
52887885
52887886
52887887
52887888
52887889
52887890
52887891
52887892
52887893
52887894
52887895
52887896
52887897
52887898
52887899
52887900
52887901
52887902
52887903
52887904
52887905
528...

result:

ok 99999 lines

Test #82:

score: 0
Accepted
time: 186ms
memory: 33752kb

input:

100000 100000 99998
965 47035 965 47035
8321 7838 8322 7839
39855 4577 39856 4577
82969 98145 82970 98145
34424 5877 34424 5878
70565 71222 70566 71223
32706 52658 32707 52658
63985 1614 63985 1614
16262 47046 16263 47047
28748 71496 28748 71497
20414 83043 20414 83043
63526 42790 63526 42790
1310 1...

output:

44501178
44501179
44501180
44501181
44501182
44501183
44501184
44501185
44501186
44501187
44501188
44501189
44501190
44501191
44501192
44501193
44501194
44501195
44501196
44501197
44501198
44501199
44501200
44501201
44501202
44501203
44501204
44501205
44501206
44501207
44501208
44501209
44501210
445...

result:

ok 99999 lines

Test #83:

score: 0
Accepted
time: 186ms
memory: 33784kb

input:

99999 100000 99995
60425 4356 60426 4356
55122 49269 55123 49270
9730 89743 9731 89743
26916 31162 26916 31163
31354 2030 31355 2031
29862 4492 29863 4492
88530 18786 88530 18787
98486 46284 98486 46284
1941 95001 1941 95001
76973 47351 76973 47351
43686 86462 43687 86463
60570 85844 60571 85845
776...

output:

52576591
52576592
52576593
52576594
52576595
52576596
52576597
52576598
52576599
52576600
52576601
52576602
52576603
52576604
52576605
52576606
52576607
52576608
52576609
52576610
52576611
52576612
52576613
52576614
52576615
52576616
52576617
52576618
52576619
52576620
52576621
52576622
52576623
525...

result:

ok 99996 lines

Test #84:

score: 0
Accepted
time: 198ms
memory: 33976kb

input:

100000 99995 100000
66943 70973 66944 70973
13921 21200 13921 21200
43115 86548 43115 86548
78529 93357 78530 93358
99490 90499 99491 90499
71047 54582 71047 54583
72591 2147 72592 2147
61619 9733 61619 9733
79370 48463 79371 48463
8191 50174 8192 50175
49572 49128 49572 49129
7399 2213 7399 2213
42...

output:

59533942
59533943
59533944
59533945
59533944
59533945
59533946
59533947
59533948
59533949
59533950
59533951
59533952
59533953
59533954
59533955
59533956
59533957
59533958
59533959
59533960
59533961
59533962
59533963
59533964
59533965
59533966
59533967
59533968
59533969
59533970
59533971
59533972
595...

result:

ok 100001 lines

Test #85:

score: 0
Accepted
time: 187ms
memory: 33892kb

input:

99999 100000 100000
43449 75835 43449 75836
3343 9787 3344 9788
60600 9585 60600 9586
9680 30603 9680 30603
84450 85461 84450 85462
38683 2998 38684 2998
80751 85174 80752 85175
11926 16424 11926 16424
76159 29975 76160 29976
45012 39160 45013 39160
87481 26741 87481 26742
91635 70531 91636 70531
92...

output:

60554065
60554066
60554067
60554068
60554069
60554070
60554071
60554072
60554073
60554074
60554075
60554076
60554077
60554078
60554079
60554080
60554081
60554082
60554083
60554084
60554085
60554086
60554087
60554088
60554089
60554090
60554091
60554092
60554093
60554094
60554095
60554096
60554097
605...

result:

ok 100001 lines

Test #86:

score: 0
Accepted
time: 176ms
memory: 33940kb

input:

99999 99996 100000
48134 99438 48135 99438
30538 14578 30539 14578
40425 63836 40425 63837
96174 49747 96174 49747
17136 42627 17137 42627
91247 47000 91247 47001
7310 89649 7311 89650
2047 96229 2047 96230
18018 55294 18018 55294
6829 60712 6829 60712
7893 48689 7893 48689
93823 36910 93824 36911
7...

output:

59630391
59630392
59630393
59630394
59630395
59630396
59630397
59630398
59630399
59630400
59630401
59630402
59630403
59630404
59630405
59630406
59630407
59630408
59630409
59630410
59630411
59630412
59630413
59630414
59630415
59630416
59630417
59630418
59630419
59630420
59630421
59630422
59630423
596...

result:

ok 100001 lines

Test #87:

score: 0
Accepted
time: 74ms
memory: 22488kb

input:

25000 0 99996
24915 13542
11783 16970
4881 7084
15899 1695
17999 7084
15899 23185
15899 5608
15899 6714
1363 16970
24915 21038
21747 7084
24915 23703
15899 2877
21507 7084
21951 7084
18668 16970
14550 7084
15899 15677
20288 7084
15899 14761
1593 16970
15899 1407
10720 16970
24915 21882
18692 16970
2...

output:

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
10...

result:

ok 99997 lines

Test #88:

score: 0
Accepted
time: 71ms
memory: 22484kb

input:

25000 0 99996
5848 6064
4698 2173
24286 3396
5848 1780
20346 2173
1421 2173
5848 6213
12202 6054
5848 14071
3847 3396
15850 2173
22691 3396
12202 2663
5848 7307
14039 3396
15836 3396
12202 15991
12202 11999
5848 16981
15981 2173
12202 21068
12202 13262
5848 13259
3237 3396
8698 3396
9972 2173
14316 ...

output:

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
10...

result:

ok 99997 lines

Test #89:

score: 0
Accepted
time: 264ms
memory: 36072kb

input:

100000 100000 100000
73709 2066 73710 2069
27880 91855 27884 91859
86924 30204 86925 30205
94824 58506 94826 58509
14835 27174 14841 73983
12325 50385 12325 50641
48723 27174 48723 73983
33877 99539 33877 99540
42731 69301 42732 69305
21864 65238 21865 65238
56506 27174 56508 73983
7005 18211 7008 1...

output:

3880949640
3880949639
3880949638
3880949639
3880949638
3880949639
3880949640
3880949641
3880949640
3880949639
3880949640
3880949641
3880949642
3880949643
3880949642
3880949641
3880949640
3880949639
3880949638
3880949639
3880949640
3880949641
3880949640
3880949641
3880949640
3880949641
3880949640
388...

result:

ok 100001 lines

Test #90:

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

input:

99997 100000 100000
45761 58634 45761 59964
8341 22836 8343 22840
66403 25567 66404 25570
93272 87663 93273 87664
79402 58582 79402 60009
62165 19925 62168 19929
60380 45857 60381 45860
19954 57892 19954 60676
79844 58635 79845 59961
93651 85452 93652 85453
94226 40823 94228 40823
19192 17894 19195 ...

output:

219858110
219858111
219858112
219858113
219858114
219858115
219858116
219858117
219858118
219858119
219858120
219858121
219858121
219858122
219858123
219858124
219858125
219858126
219858127
219858128
219858129
219858130
219858131
219858132
219858133
219858134
219858135
219858136
219858137
219858138
...

result:

ok 100001 lines

Test #91:

score: 0
Accepted
time: 231ms
memory: 37660kb

input:

99997 100000 100000
24850 33801 24851 33801
83462 18765 83462 19005
39913 30481 39916 30485
38172 18543 38172 19189
58933 18595 58937 19157
7967 18588 7967 19161
10031 15997 10031 21765
56596 23748 56597 23751
1536 18760 1541 19016
7639 78613 7640 78615
91721 16065 91721 21713
46890 18772 46890 1900...

output:

208733498
208733499
208733500
208733501
208733502
208733503
208733504
208733505
208733506
208733507
208733508
208733509
208733510
208733511
208733512
208733513
208733514
208733515
208733516
208733517
208733518
208733519
208733520
208733521
208733522
208733523
208733524
208733525
208733526
208733527
...

result:

ok 100001 lines

Test #92:

score: 0
Accepted
time: 60ms
memory: 22720kb

input:

7 99997 100000
2 2 2 6
5 6 5 7
1 2 7 7
2 4 7 5
2 2 4 6
4 3 4 7
3 1 6 6
1 4 5 7
1 2 5 4
7 1 7 2
2 1 6 4
2 3 4 4
1 3 5 3
4 5 6 6
3 2 3 7
2 5 5 7
5 2 7 5
6 3 7 6
2 4 6 6
2 3 2 7
5 3 5 7
3 6 5 7
3 3 5 6
2 1 7 4
1 2 7 3
4 1 6 3
3 1 4 6
1 1 2 4
5 3 7 5
1 5 7 5
3 1 3 3
4 1 7 7
2 2 6 5
1 1 7 2
3 1 6 7
2 3 7...

output:

20
21
20
21
20
21
22
23
22
21
22
23
24
23
24
24
24
23
22
21
20
21
22
23
22
21
22
23
24
24
23
24
24
23
22
23
24
23
24
24
24
23
22
21
22
23
22
21
22
23
22
21
20
19
18
17
18
19
20
21
20
21
22
23
22
23
22
23
24
24
24
23
24
23
22
23
24
24
24
23
24
24
24
24
24
24
24
24
24
23
22
21
20
19
20
21
22
21
22
23
...

result:

ok 100001 lines

Test #93:

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

input:

99995 100000 99996
25136 14291 93049 68049
41187 65106 41606 86702
36811 54357 52542 88553
24562 22216 70937 41764
23497 11410 94739 87347
38116 34710 81997 98878
45562 39065 79888 39261
13050 50767 16605 59148
56559 25187 97438 86938
39705 39255 46736 39871
6667 35824 9571 99144
73862 29076 91705 8...

output:

4999273818
4999273817
4999273816
4999273815
4999273814
4999273813
4999273814
4999273815
4999273814
4999273813
4999273812
4999273811
4999273812
4999273813
4999273814
4999273815
4999273816
4999273815
4999273816
4999273817
4999273816
4999273815
4999273814
4999273815
4999273814
4999273813
4999273812
499...

result:

ok 99997 lines

Test #94:

score: 0
Accepted
time: 324ms
memory: 37276kb

input:

99997 100000 99995
64501 48851 95161 66283
29644 4417 65340 36792
4693 4308 26187 87642
23975 11073 70500 27052
34424 47834 48340 82208
19104 16640 58972 35604
18676 16665 43048 26967
35287 4797 82900 57275
14821 55478 41021 55833
47748 19366 67177 66621
22683 4906 28729 41206
57936 184 99452 91180
...

output:

4999693417
4999693416
4999693415
4999693416
4999693415
4999693416
4999693415
4999693414
4999693413
4999693414
4999693413
4999693412
4999693413
4999693412
4999693411
4999693410
4999693411
4999693410
4999693409
4999693408
4999693407
4999693406
4999693407
4999693406
4999693407
4999693408
4999693409
499...

result:

ok 99996 lines

Test #95:

score: 0
Accepted
time: 337ms
memory: 37196kb

input:

100000 100000 100000
67163 22315 98082 85750
8218 9592 97341 39245
22425 1894 22618 39118
14718 636 99124 99226
46591 11150 78193 33869
14778 49424 96363 99764
47891 63729 50130 87848
12816 11628 85817 82965
6246 4493 50215 26740
4137 38640 85591 93048
7244 44632 93116 97453
24407 587 80079 99350
43...

output:

4999943154
4999943153
4999943152
4999943151
4999943150
4999943151
4999943152
4999943153
4999943152
4999943151
4999943152
4999943153
4999943152
4999943153
4999943152
4999943151
4999943152
4999943151
4999943152
4999943153
4999943152
4999943153
4999943154
4999943155
4999943156
4999943157
4999943156
499...

result:

ok 100001 lines

Test #96:

score: 0
Accepted
time: 283ms
memory: 36492kb

input:

100000 99996 99996
24065 4246 82569 87890
44570 1412 86016 41779
13977 5389 43146 12920
63488 60587 79167 83727
47671 69151 90105 72297
35957 21023 81865 96046
56259 68679 93452 92183
16840 75091 51022 91253
12827 55254 44786 59669
3208 71426 80933 82336
20524 6865 69279 79846
8762 14857 54872 55209...

output:

1815528566
1815528567
1815528568
1815528569
1815528570
1815528571
1815528572
1815528572
1815528573
1815528574
1815528575
1815528575
1815528576
1815528577
1815528578
1815528579
1815528580
1815528581
1815528582
1815528583
1815528584
1815528585
1815528586
1815528587
1815528588
1815528589
1815528590
181...

result:

ok 99997 lines

Test #97:

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

input:

99996 100000 99998
3723 80731 76814 98495
49639 176 85767 67351
89655 18680 92282 97943
26177 14036 73601 95379
10465 3217 70545 66828
13018 27202 76494 56717
52365 337 57081 80503
4653 21480 33827 32848
43711 14993 69347 94165
15472 45538 97710 94330
30847 22267 77485 80297
71890 5621 95696 37745
4...

output:

2681600394
2681600395
2681600395
2681600396
2681600397
2681600398
2681600399
2681600400
2681600401
2681600402
2681600403
2681600404
2681600404
2681600405
2681600406
2681600406
2681600406
2681600407
2681600408
2681600409
2681600410
2681600411
2681600411
2681600412
2681600413
2681600414
2681600414
268...

result:

ok 99999 lines

Test #98:

score: 0
Accepted
time: 227ms
memory: 34096kb

input:

100000 100000 100000
66360 27903 95454 53598
25646 23268 67982 52777
1673 33160 1673 33160
76810 91449 76810 91450
74521 32372 78057 49391
20237 50649 20238 50649
13050 34542 64479 58020
32006 34669 32007 34669
16634 24728 16635 24729
2934 18089 67983 59542
6459 61282 92444 78917
60369 29602 60370 2...

output:

40266664
40266665
40266666
40266667
40266668
40266669
40266670
40266671
40266672
40266673
40266674
40266675
40266676
40266677
40266678
40266679
40266680
40266681
40266682
40266683
40266684
40266685
40266686
40266687
40266688
40266689
40266690
40266691
40266692
40266693
40266694
40266695
40266696
402...

result:

ok 100001 lines

Test #99:

score: 0
Accepted
time: 201ms
memory: 33688kb

input:

100000 99996 100000
23004 68831 23005 68832
57030 69279 57031 69279
51487 94618 51488 94618
12258 1855 12259 1856
37363 79557 37363 79558
69902 55206 69903 55206
99088 39195 99088 39196
91436 8409 91437 8410
21967 64083 21967 64084
7554 82207 7554 82207
69038 96344 69039 96344
21231 53717 21231 5371...

output:

40330249
40330250
40330251
40330252
40330253
40330254
40330255
40330256
40330257
40330258
40330259
40330260
40330261
40330262
40330263
40330264
40330265
40330266
40330267
40330268
40330269
40330270
40330271
40330272
40330273
40330274
40330275
40330276
40330277
40330278
40330279
40330280
40330281
403...

result:

ok 100001 lines

Test #100:

score: 0
Accepted
time: 221ms
memory: 33832kb

input:

99997 100000 99996
63276 38043 63276 38044
64762 79889 64763 79889
49549 18482 49550 18483
2857 75493 2858 75494
55648 15281 55648 15282
51800 98677 51800 98677
68848 3484 68848 3485
77272 29374 77273 29375
66125 20116 66126 20117
96445 92442 96446 92443
16962 7740 16962 7740
71537 81490 71538 81490...

output:

49667786
49667787
49667788
49667789
49667790
49667791
49667792
49667793
49667794
49667795
49667796
49667797
49667798
49667799
49667800
49667801
49667802
49667803
49667804
49667805
49667806
49667807
49667808
49667809
49667810
49667811
49667812
49667813
49667814
49667815
49667816
49667817
49667818
496...

result:

ok 99997 lines

Test #101:

score: 0
Accepted
time: 249ms
memory: 33888kb

input:

100000 100000 99998
19347 16200 19348 16201
16631 7016 16631 7016
45209 83056 45209 83057
10462 60154 10462 60155
96497 68253 96498 68254
68944 85220 68944 85220
43916 38339 43917 38339
18079 90103 18080 90104
78304 79254 78305 79254
39111 22070 39112 22070
47083 7643 47084 7644
6975 7306 6975 7306
...

output:

50788261
50788262
50788263
50788264
50788265
50788266
50788267
50788268
50788269
50788270
50788271
50788272
50788273
50788274
50788275
50788276
50788277
50788278
50788279
50788280
50788281
50788282
50788283
50788284
50788285
50788286
50788287
50788288
50788289
50788290
50788291
50788292
50788293
507...

result:

ok 99999 lines

Test #102:

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

input:

100000 99997 100000
984 54205 985 54205
88594 75891 88595 75891
51679 14741 51679 14742
30046 44348 30046 44349
68814 15210 68815 15210
1835 53522 1836 53523
625 92287 626 92288
13074 28313 13074 28313
58064 48831 58064 48832
23573 3111 23574 3112
30280 64010 30280 64010
26668 8647 26669 8648
85949 ...

output:

48389412
48389413
48389414
48389415
48389416
48389417
48389418
48389419
48389420
48389421
48389422
48389423
48389424
48389425
48389426
48389427
48389428
48389429
48389430
48389431
48389432
48389433
48389434
48389435
48389436
48389437
48389438
48389439
48389440
48389441
48389442
48389443
48389444
483...

result:

ok 100001 lines

Test #103:

score: 0
Accepted
time: 214ms
memory: 33900kb

input:

99997 100000 99995
66865 74729 66866 74729
94476 82344 94476 82344
7158 98413 7158 98413
75288 49991 75289 49991
86646 33082 86647 33082
5304 54154 5304 54154
53877 40515 53877 40515
38554 19112 38554 19112
82346 76604 82346 76604
3825 19060 3826 19061
9290 95935 9290 95936
60225 64206 60226 64206
9...

output:

58552184
58552185
58552186
58552187
58552188
58552189
58552190
58552191
58552192
58552193
58552194
58552195
58552196
58552197
58552198
58552199
58552200
58552201
58552202
58552203
58552204
58552205
58552206
58552207
58552208
58552209
58552210
58552211
58552212
58552213
58552214
58552215
58552216
585...

result:

ok 99996 lines

Test #104:

score: 0
Accepted
time: 204ms
memory: 33872kb

input:

100000 100000 100000
31143 83808 31143 83808
93838 61921 93839 61921
6101 29039 6101 29039
71230 79025 71231 79026
89372 83163 89372 83163
89942 22795 89943 22796
71675 75205 71676 75205
23026 1432 23027 1433
26811 43707 26812 43707
31052 62995 31053 62995
45424 21127 45424 21127
7081 515 7082 516
4...

output:

61426307
61426308
61426309
61426310
61426311
61426312
61426313
61426314
61426315
61426316
61426317
61426318
61426319
61426320
61426321
61426322
61426323
61426324
61426325
61426326
61426327
61426328
61426329
61426330
61426331
61426332
61426333
61426334
61426335
61426336
61426337
61426338
61426339
614...

result:

ok 100001 lines

Test #105:

score: 0
Accepted
time: 189ms
memory: 33828kb

input:

100000 100000 100000
26429 74191 26429 74191
71018 48305 71019 48305
765 47611 765 47611
41558 58919 41558 58919
92189 11219 92189 11219
86157 54469 86157 54469
95730 25063 95731 25064
30275 79517 30276 79518
55362 16435 55363 16435
79160 97114 79161 97115
23359 49382 23359 49382
2868 99339 2869 993...

output:

60105024
60105025
60105026
60105027
60105028
60105029
60105030
60105031
60105032
60105033
60105034
60105035
60105036
60105037
60105038
60105039
60105040
60105041
60105042
60105043
60105044
60105045
60105046
60105047
60105048
60105049
60105050
60105051
60105052
60105053
60105054
60105055
60105056
601...

result:

ok 100001 lines

Test #106:

score: 0
Accepted
time: 66ms
memory: 22536kb

input:

25000 1 99996
1 1 25000 25000
7180 7172
21197 20241
7180 22432
7180 21059
7180 22298
7180 612
24269 20241
3026 20241
8446 24468
1804 20241
1052 4784
5727 20241
7180 14065
6071 24468
7180 23136
7180 7006
1052 1216
22663 24468
1052 984
1525 20241
1052 6715
15218 20241
5086 24468
16458 24468
19256 2024...

output:

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
10...

result:

ok 99997 lines

Test #107:

score: 0
Accepted
time: 262ms
memory: 36932kb

input:

100000 100000 100000
1 96132 98673 96133
1 29327 98673 29327
18447 74651 18522 74656
38286 48272 38286 48272
1 4312 41938 4317
72069 41375 72073 41377
96814 37568 96814 37571
1 9550 98673 9550
36626 71555 36626 71558
17981 10986 17981 10988
12436 2981 12440 2983
12010 3271 25207 3271
8701 74428 8704...

output:

4426473481
4426473480
4426473481
4426473480
4426473481
4426473482
4426473481
4426473480
4426473481
4426473480
4426473481
4426473480
4426473479
4426473480
4426473479
4426473478
4426473479
4426473480
4426473479
4426473480
4426473481
4426473480
4426473481
4426473482
4426473481
4426473480
4426473481
442...

result:

ok 100001 lines

Test #108:

score: 0
Accepted
time: 248ms
memory: 36624kb

input:

100000 100000 100000
20029 31310 20030 35428
70294 30949 70294 35786
43248 1 43249 69768
45752 30949 45752 35786
2518 93750 2521 93752
70212 30949 70212 35786
18500 41872 18502 41873
93735 73107 93736 73108
13284 31310 13295 35428
67642 47175 67644 47175
86130 77118 86133 77122
36454 56400 36458 564...

output:

3140876993
3140876994
3140876995
3140876994
3140876995
3140876994
3140876993
3140876992
3140876991
3140876992
3140876993
3140876994
3140876995
3140876996
3140876997
3140876996
3140876995
3140876994
3140876995
3140876994
3140876993
3140876992
3140876991
3140876992
3140876993
3140876992
3140876993
314...

result:

ok 100001 lines

Test #109:

score: 0
Accepted
time: 256ms
memory: 38052kb

input:

99995 100000 100000
74900 40486 75148 40486
74278 77302 75698 77302
73503 45616 76482 45616
74889 43862 75156 43864
37203 59217 37206 59220
74680 96328 75321 96328
74700 88542 75310 88542
74685 47105 75317 47107
66473 33693 66476 33697
74697 85558 75312 85558
74689 27221 75315 27222
95425 99699 9542...

output:

221890272
221890273
221890274
221890275
221890276
221890277
221890278
221890279
221890280
221890281
221890282
221890283
221890284
221890285
221890286
221890287
221890288
221890289
221890290
221890291
221890292
221890293
221890294
221890295
221890296
221890297
221890298
221890299
221890300
221890301
...

result:

ok 100001 lines

Test #110:

score: 0
Accepted
time: 189ms
memory: 32796kb

input:

9 299997 300000
3 2 7 5
1 1 4 7
1 3 7 9
2 1 4 4
2 2 9 9
3 1 6 8
4 5 5 6
5 5 9 9
4 2 8 3
1 1 8 3
5 2 6 9
6 1 7 8
7 1 9 7
7 2 8 8
6 1 8 5
7 1 8 9
5 1 6 9
1 3 9 5
4 7 5 7
1 6 2 9
7 2 9 9
4 1 7 6
6 5 9 9
4 1 6 5
4 2 8 4
1 8 6 8
1 6 9 9
1 4 5 6
9 2 9 5
6 3 8 8
3 7 8 9
4 3 5 9
7 7 9 8
7 1 8 4
1 2 6 4
2 7 ...

output:

33
32
33
34
35
34
35
36
35
36
37
38
39
38
39
40
39
38
39
38
39
40
39
40
40
39
40
40
39
40
39
38
37
38
37
38
39
40
40
39
40
39
38
37
38
39
38
37
38
39
40
39
38
37
38
37
38
39
40
39
38
37
36
37
38
37
38
39
38
37
36
37
38
39
40
40
40
39
40
40
40
39
40
39
40
40
39
38
37
36
37
38
39
40
40
40
39
38
39
40
...

result:

ok 300001 lines

Test #111:

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

input:

100 3 100
82 13 85 16
2 13 99 16
82 2 85 100
82 15
83 15
84 15
85 15
82 15
82 13
82 16
82 14
83 13
84 13
85 13
83 13
83 16
83 14
84 16
85 16
84 16
84 14
85 14
85 14
85 13
84 13
83 13
82 13
85 13
85 14
85 15
85 16
84 14
83 14
82 14
84 14
84 15
84 16
83 15
82 15
83 15
83 16
82 16
82 16
85 15
83 15
84 ...

output:

768
769
770
769
768
769
768
767
766
765
764
763
764
763
762
761
760
761
760
759
760
761
762
761
762
761
760
761
762
763
764
765
764
765
764
765
764
763
764
765
764
763
764
763
764
765
764
765
766
765
766
767
768
769
768
767
766
767
768
767
768
769
768
767
766
765
764
763
762
761
760
761
762
763
762
...

result:

ok 101 lines

Test #112:

score: 0
Accepted
time: 1394ms
memory: 83064kb

input:

300000 299998 300000
5432 118148 91701 219320
2668 46413 28278 180213
26727 229823 61846 243955
74631 73068 124447 259014
44566 237643 232203 290120
2382 24111 275288 293295
698 140648 68877 176295
25070 156884 193358 218411
40965 40939 165259 212960
159797 59599 234958 72829
122209 22377 122430 399...

output:

44998845600
44998845599
44998845598
44998845599
44998845600
44998845599
44998845600
44998845599
44998845600
44998845599
44998845598
44998845597
44998845596
44998845597
44998845596
44998845597
44998845596
44998845595
44998845596
44998845597
44998845598
44998845597
44998845598
44998845597
44998845596
...

result:

ok 300001 lines

Test #113:

score: 0
Accepted
time: 1387ms
memory: 82556kb

input:

299997 299996 299995
42404 155690 261331 237705
92574 232724 273853 298367
13267 50409 285425 233054
73412 152519 135427 206825
360 31343 291414 248976
1568 115251 136699 218077
29285 79091 133435 234837
11362 21745 195097 297886
139214 93773 213616 166290
47929 94341 138194 216787
37106 5650 138921...

output:

44999034972
44999034973
44999034974
44999034975
44999034976
44999034977
44999034978
44999034977
44999034976
44999034975
44999034976
44999034977
44999034976
44999034975
44999034974
44999034975
44999034976
44999034975
44999034974
44999034975
44999034976
44999034975
44999034976
44999034977
44999034976
...

result:

ok 299996 lines

Test #114:

score: 0
Accepted
time: 1342ms
memory: 82544kb

input:

300000 299998 300000
36281 5823 215086 191020
98876 79519 225298 295342
32071 10111 287832 38151
72854 82995 299620 112060
54734 188016 175689 262231
55035 42978 184102 167719
63703 71047 136254 261459
47298 25421 274438 269325
171927 78346 209627 298348
6415 44659 253668 199351
23321 9610 291592 24...

output:

44999894875
44999894876
44999894877
44999894876
44999894877
44999894878
44999894877
44999894876
44999894877
44999894878
44999894877
44999894878
44999894879
44999894878
44999894877
44999894878
44999894877
44999894876
44999894877
44999894878
44999894879
44999894878
44999894877
44999894876
44999894875
...

result:

ok 300001 lines

Test #115:

score: 0
Accepted
time: 1129ms
memory: 79948kb

input:

299999 299996 300000
93772 63574 106528 160585
205753 10512 249389 110887
61850 148487 278115 196944
31875 50431 108857 75609
20534 24380 280378 87242
109661 63374 158268 239238
34279 98151 242217 156981
51213 175792 85882 222559
39899 33298 63858 150727
190383 95861 235262 134504
101524 253985 2135...

output:

3810188182
3810188183
3810188184
3810188185
3810188186
3810188187
3810188188
3810188189
3810188190
3810188191
3810188192
3810188193
3810188194
3810188195
3810188196
3810188197
3810188198
3810188199
3810188200
3810188201
3810188202
3810188203
3810188204
3810188205
3810188206
3810188207
3810188208
381...

result:

ok 300001 lines

Test #116:

score: 0
Accepted
time: 1144ms
memory: 79520kb

input:

299995 299995 299999
191098 1204 261802 230693
84389 19756 174294 262984
167185 42420 227730 281259
104621 36118 155693 266597
107690 79053 211589 231667
73526 166017 293702 297265
113958 147404 139197 182032
79624 7057 187345 192051
168111 133572 260554 162238
182252 239840 195196 288876
10154 8167...

output:

17420012655
17420012656
17420012657
17420012658
17420012658
17420012659
17420012660
17420012661
17420012662
17420012663
17420012663
17420012664
17420012665
17420012666
17420012667
17420012668
17420012669
17420012669
17420012670
17420012671
17420012672
17420012673
17420012674
17420012675
17420012675
...

result:

ok 300000 lines

Test #117:

score: 0
Accepted
time: 857ms
memory: 72500kb

input:

300000 300000 300000
51851 83409 84930 192312
21957 203484 21958 203485
108764 203595 108765 203596
8042 44512 51704 239098
12806 16435 83702 155581
105202 185974 105202 185974
203433 258924 203433 258924
85180 273493 85180 273493
15673 6152 15674 6153
242594 202185 242594 202186
201236 257365 28340...

output:

269477785
269477786
269477787
269477788
269477789
269477790
269477791
269477792
269477793
269477794
269477795
269477796
269477797
269477798
269477799
269477800
269477801
269477802
269477803
269477804
269477805
269477806
269477807
269477808
269477809
269477810
269477811
269477812
269477813
269477814
...

result:

ok 300001 lines

Test #118:

score: 0
Accepted
time: 788ms
memory: 70744kb

input:

300000 300000 300000
69805 231563 69806 231564
285259 57156 285260 57157
21882 185912 21883 185912
172617 289752 172618 289753
113381 73449 113381 73449
31694 40108 31695 40109
216163 26915 216164 26916
43564 89608 63866 245257
16768 51264 16768 51265
238126 137928 238126 137929
142258 203085 142259...

output:

300705441
300705442
300705443
300705444
300705445
300705446
300705447
300705448
300705449
300705450
300705451
300705452
300705453
300705454
300705455
300705456
300705457
300705458
300705459
300705460
300705461
300705462
300705463
300705464
300705465
300705466
300705467
300705468
300705469
300705470
...

result:

ok 300001 lines

Test #119:

score: 0
Accepted
time: 848ms
memory: 70672kb

input:

300000 300000 300000
10045 145026 10046 145027
103633 108857 103634 108858
139066 152198 139066 152198
205071 282190 205072 282191
215013 95065 215014 95065
195948 175374 195949 175374
205303 4260 205303 4260
181874 72466 181875 72467
25848 235157 25849 235157
177783 140888 177784 140889
157550 1241...

output:

300810491
300810492
300810493
300810494
300810495
300810496
300810497
300810498
300810499
300810500
300810501
300810502
300810503
300810504
300810505
300810506
300810507
300810508
300810509
300810510
300810511
300810512
300810513
300810514
300810515
300810516
300810517
300810518
300810519
300810520
...

result:

ok 300001 lines

Test #120:

score: 0
Accepted
time: 776ms
memory: 71008kb

input:

299999 300000 300000
42715 6610 100784 258537
93687 237864 93687 237865
278920 282838 278920 282839
65461 182431 65461 182431
292711 59704 292711 59704
255775 275245 255775 275245
287256 283876 287257 283877
44875 111885 44875 111885
84756 226402 84756 226402
194458 143829 194459 143829
283238 12865...

output:

303725477
303725478
303725479
303725480
303725481
303725482
303725483
303725484
303725485
303725486
303725487
303725488
303725489
303725490
303725491
303725492
303725493
303725494
303725495
303725496
303725497
303725498
303725499
303725500
303725501
303725502
303725503
303725504
303725505
303725506
...

result:

ok 300001 lines

Test #121:

score: 0
Accepted
time: 780ms
memory: 70932kb

input:

300000 300000 299996
39608 281819 39608 281820
54361 234380 161709 247899
117278 17139 117278 17139
171427 40786 171427 40787
126391 280509 126392 280510
6130 119029 6131 119029
138484 45935 138485 45935
8274 14784 8274 14784
121986 71906 121986 71906
108432 62194 108432 62194
14912 54885 14912 5488...

output:

328794144
328794145
328794146
328794147
328794148
328794149
328794150
328794151
328794152
328794153
328794154
328794155
328794156
328794157
328794158
328794159
328794160
328794161
328794162
328794163
328794164
328794165
328794166
328794167
328794168
328794169
328794170
328794171
328794172
328794173
...

result:

ok 299997 lines

Test #122:

score: 0
Accepted
time: 747ms
memory: 70960kb

input:

300000 299999 299999
187095 144404 187095 144404
250089 19553 250089 19553
94510 283234 94511 283234
24195 260586 24196 260587
1076 7608 1076 7608
167058 135179 167058 135180
272463 33703 272464 33703
248993 258176 248994 258177
156013 100039 156014 100040
290870 178678 290871 178678
255607 56026 25...

output:

327654439
327654440
327654441
327654442
327654443
327654444
327654445
327654446
327654447
327654448
327654449
327654450
327654451
327654452
327654453
327654454
327654455
327654456
327654457
327654458
327654459
327654460
327654461
327654462
327654463
327654464
327654465
327654466
327654467
327654468
...

result:

ok 300000 lines

Test #123:

score: 0
Accepted
time: 725ms
memory: 70244kb

input:

299995 299998 300000
9494 93617 9494 93618
70998 96461 70998 96461
59376 150454 59376 150455
190821 275357 190821 275358
148830 84986 148830 84986
178594 229045 178595 229045
137417 167742 137417 167743
234013 206395 234014 206396
32485 121519 32485 121520
95363 153277 95363 153278
133503 290664 133...

output:

176837961
176837962
176837963
176837964
176837965
176837966
176837967
176837968
176837969
176837970
176837971
176837972
176837973
176837974
176837975
176837976
176837977
176837978
176837979
176837980
176837981
176837982
176837983
176837984
176837985
176837986
176837987
176837988
176837989
176837990
...

result:

ok 300001 lines

Test #124:

score: 0
Accepted
time: 779ms
memory: 70188kb

input:

299998 300000 300000
183100 74528 183100 74529
121979 5002 121979 5003
224271 267535 224272 267535
252214 272557 252214 272558
235132 3636 235133 3636
262290 46562 262291 46563
210826 95622 210826 95622
53509 88524 53509 88525
192987 6001 192987 6002
8926 157535 8926 157536
82953 181210 82954 181211...

output:

174174109
174174110
174174111
174174112
174174113
174174114
174174115
174174116
174174117
174174118
174174119
174174120
174174121
174174122
174174123
174174124
174174125
174174126
174174127
174174128
174174129
174174130
174174131
174174132
174174133
174174134
174174135
174174136
174174137
174174138
...

result:

ok 300001 lines

Test #125:

score: 0
Accepted
time: 732ms
memory: 70872kb

input:

299995 299999 300000
17836 201130 17837 201130
37120 240635 37121 240636
242022 45134 242023 45135
196185 155937 196185 155937
82578 11777 82578 11778
88881 36407 88882 36407
163096 46202 163097 46202
27161 16378 27161 16378
265030 134486 265030 134486
88959 214745 88959 214746
41084 9562 41085 9563...

output:

165713151
165713152
165713153
165713154
165713155
165713156
165713157
165713158
165713159
165713160
165713161
165713162
165713163
165713164
165713165
165713166
165713167
165713168
165713169
165713170
165713171
165713172
165713173
165713174
165713175
165713176
165713177
165713178
165713179
165713180
...

result:

ok 300001 lines

Test #126:

score: 0
Accepted
time: 215ms
memory: 33576kb

input:

75000 1 299996
1 1 75000 75000
59144 21089
59144 53784
59144 54441
67211 9424
59028 14008
48445 33326
43497 14008
67211 70587
59144 37719
38817 14008
46529 14008
5552 14008
20498 33326
59144 66328
5900 14008
62725 33326
67211 47629
69768 33326
59144 46158
59144 36315
67211 7456
67211 57234
59144 316...

output:

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
10...

result:

ok 299997 lines

Test #127:

score: 0
Accepted
time: 950ms
memory: 78876kb

input:

300000 300000 300000
234601 6110 234601 94774
177283 171482 177287 171483
250661 35668 250662 65413
204104 1 204104 101592
118390 6107 118390 94777
92410 1 92412 101592
24576 178865 24578 178866
46148 203975 46150 203977
203738 6110 203742 94774
292872 2503 292872 98449
80473 162934 80476 162934
223...

output:

26656312566
26656312567
26656312568
26656312569
26656312570
26656312571
26656312572
26656312573
26656312574
26656312573
26656312572
26656312573
26656312574
26656312575
26656312576
26656312575
26656312576
26656312577
26656312576
26656312575
26656312576
26656312577
26656312576
26656312577
26656312578
...

result:

ok 300001 lines

Test #128:

score: 0
Accepted
time: 938ms
memory: 85280kb

input:

299996 300000 300000
170968 250983 174715 250984
171983 136366 173724 136366
172660 159068 173080 159069
200961 163537 200962 163540
170778 201906 174895 201906
172405 112949 173330 112950
172430 62347 173295 62347
172667 116171 173076 116178
172427 56091 173302 56092
171954 147026 173763 147028
144...

output:

1302284233
1302284234
1302284235
1302284236
1302284237
1302284238
1302284239
1302284240
1302284241
1302284242
1302284243
1302284244
1302284245
1302284246
1302284247
1302284248
1302284249
1302284250
1302284251
1302284252
1302284253
1302284254
1302284255
1302284256
1302284257
1302284258
1302284259
130...

result:

ok 300001 lines

Subtask #10:

score: 1
Accepted

Test #129:

score: 1
Accepted
time: 208ms
memory: 32284kb

input:

10 300000 300000
1 1 4 1
6 3 9 7
5 5 9 8
9 5 10 10
1 7 5 8
4 2 9 3
6 5 9 10
1 5 10 10
1 5 8 9
2 6 6 7
2 7 7 8
6 7 10 9
8 2 9 4
2 1 3 10
6 4 7 8
1 1 8 9
5 4 6 4
4 6 5 7
8 1 9 2
5 4 10 4
5 6 6 8
6 1 8 6
1 5 10 10
9 7 10 10
2 6 3 10
5 2 5 5
1 8 1 9
4 3 9 10
1 7 9 7
6 4 10 4
1 3 5 8
8 8 9 9
4 1 4 4
7 2 ...

output:

50
49
48
47
48
49
50
49
50
49
48
49
48
49
50
49
48
47
48
49
50
49
50
49
48
49
50
49
50
49
50
49
50
49
48
47
48
47
48
49
50
49
48
49
50
49
48
49
48
47
48
47
48
49
48
47
48
47
46
47
48
47
46
47
48
49
50
49
50
49
48
47
48
49
50
49
50
49
48
47
46
45
44
45
46
47
48
49
50
49
50
49
50
49
50
49
48
49
48
47
...

result:

ok 300001 lines

Test #130:

score: 0
Accepted
time: 1313ms
memory: 82928kb

input:

300000 299996 300000
65484 66615 161428 292998
145384 62573 247732 95643
59372 226897 225901 295683
35261 79744 83642 163383
25226 197470 213808 246241
187233 93275 260770 249652
19598 30641 137882 143252
12354 25402 217331 32646
130422 10096 286238 69277
159070 5442 248329 259882
51548 56843 289380...

output:

44999828986
44999828985
44999828984
44999828985
44999828984
44999828985
44999828986
44999828985
44999828984
44999828983
44999828984
44999828983
44999828982
44999828983
44999828982
44999828983
44999828984
44999828985
44999828984
44999828985
44999828984
44999828985
44999828984
44999828985
44999828984
...

result:

ok 300001 lines

Test #131:

score: 0
Accepted
time: 1384ms
memory: 83020kb

input:

299995 300000 300000
113628 184742 250596 198266
188300 17571 205361 124223
116512 130965 242678 149910
148458 35858 265364 139647
18191 114958 29084 174945
92017 5462 289027 169781
103407 187249 211200 215044
25761 11306 215649 100089
79236 95835 200596 96891
91565 244328 130879 276247
80953 79092 ...

output:

44997817243
44997817244
44997817245
44997817246
44997817245
44997817246
44997817245
44997817244
44997817245
44997817244
44997817245
44997817246
44997817245
44997817244
44997817243
44997817242
44997817243
44997817244
44997817243
44997817244
44997817245
44997817246
44997817247
44997817248
44997817249
...

result:

ok 300001 lines

Test #132:

score: 0
Accepted
time: 1364ms
memory: 82532kb

input:

299998 300000 299999
143542 75250 171239 127017
81151 44435 251116 178019
14105 49942 298384 272461
145945 53299 290320 244838
6268 173671 142310 196876
97082 7132 229501 280106
134191 71561 292526 288074
14973 28239 216607 299266
79337 38874 91790 287607
92265 10609 278565 295007
5032 25323 289408 ...

output:

44999190253
44999190254
44999190255
44999190254
44999190253
44999190254
44999190253
44999190254
44999190255
44999190254
44999190255
44999190256
44999190255
44999190256
44999190257
44999190256
44999190255
44999190256
44999190257
44999190258
44999190257
44999190256
44999190257
44999190256
44999190257
...

result:

ok 300000 lines

Test #133:

score: 0
Accepted
time: 1103ms
memory: 79748kb

input:

299998 299998 300000
104379 84398 185158 169340
201752 34577 211062 175936
54080 127978 266776 247622
132074 16679 283450 151380
120571 55509 228930 241508
221012 67086 261044 81267
26247 62870 31750 187333
260150 68395 269469 226560
12584 64014 171167 201011
19591 23294 189588 186503
74641 189781 1...

output:

22854076011
22854076012
22854076012
22854076013
22854076014
22854076014
22854076014
22854076015
22854076016
22854076016
22854076017
22854076018
22854076018
22854076019
22854076020
22854076021
22854076022
22854076022
22854076023
22854076024
22854076025
22854076026
22854076027
22854076028
22854076029
...

result:

ok 300001 lines

Test #134:

score: 0
Accepted
time: 1116ms
memory: 79984kb

input:

300000 299997 300000
211958 151053 227689 214359
52315 21956 63873 101192
216643 25776 240218 128009
37764 6467 189466 295829
53257 21690 244921 241418
200866 38513 295013 167151
35578 43392 257320 74466
10835 110897 98974 130710
124023 39402 124796 252105
52344 38860 209806 210057
76937 205954 2665...

output:

22535601124
22535601125
22535601126
22535601127
22535601128
22535601129
22535601130
22535601131
22535601131
22535601131
22535601132
22535601133
22535601134
22535601134
22535601135
22535601136
22535601137
22535601138
22535601139
22535601140
22535601141
22535601141
22535601142
22535601143
22535601143
...

result:

ok 300001 lines

Test #135:

score: 0
Accepted
time: 791ms
memory: 70360kb

input:

299995 300000 300000
150954 139393 150955 139393
43218 39797 43219 39798
272645 263084 272645 263084
206466 37556 206467 37556
108941 817 108942 818
298027 17841 298027 17841
98465 123678 98466 123679
193569 261610 193569 261610
136000 126310 136001 126310
94854 275740 94855 275740
260947 74902 2609...

output:

269034558
269034559
269034560
269034561
269034562
269034563
269034564
269034565
269034566
269034567
269034568
269034569
269034570
269034571
269034572
269034573
269034574
269034575
269034576
269034577
269034578
269034579
269034580
269034581
269034582
269034583
269034584
269034585
269034586
269034587
...

result:

ok 300001 lines

Test #136:

score: 0
Accepted
time: 798ms
memory: 70436kb

input:

300000 299998 300000
123496 107851 123496 107851
257807 172900 257807 172901
12289 262792 12290 262793
118461 162912 118461 162912
180385 269170 180385 269171
169554 268601 169555 268602
274753 131636 274753 131637
142974 71388 142974 71389
226941 187941 226941 187941
22877 273063 22877 273064
16281...

output:

276532845
276532846
276532847
276532848
276532849
276532850
276532851
276532852
276532853
276532854
276532855
276532856
276532857
276532858
276532859
276532860
276532861
276532862
276532863
276532864
276532865
276532866
276532867
276532868
276532869
276532870
276532871
276532872
276532873
276532874
...

result:

ok 300001 lines

Test #137:

score: 0
Accepted
time: 747ms
memory: 70884kb

input:

300000 300000 300000
39192 72344 39193 72344
272710 113433 272710 113433
38274 186779 38275 186779
126110 1 212596 299999
160058 1018 160058 1018
109803 227149 109804 227150
55013 33785 55014 33786
29338 133296 29339 133296
260336 62050 260337 62050
297615 141192 297615 141192
222314 256321 222314 2...

output:

308897555
308897556
308897557
308897558
308897559
308897560
308897561
308897562
308897563
308897564
308897565
308897566
308897567
308897568
308897569
308897570
308897571
308897572
308897573
308897574
308897575
308897576
308897577
308897578
308897579
308897580
308897581
308897582
308897583
308897584
...

result:

ok 300001 lines

Test #138:

score: 0
Accepted
time: 763ms
memory: 70752kb

input:

299997 299996 299996
178497 127608 178498 127609
95766 144650 95767 144651
138835 259910 138835 259910
127686 271992 127687 271993
1590 74626 1591 74626
170209 153514 170209 153514
20531 125656 20531 125657
147014 281731 147014 281731
86221 108101 86221 108101
144935 212132 144935 212132
170429 8444...

output:

311261968
311261969
311261970
311261971
311261972
311261973
311261974
311261975
311261976
311261977
311261978
311261979
311261980
311261981
311261982
311261983
311261984
311261985
311261986
311261987
311261988
311261989
311261990
311261991
311261992
311261993
311261994
311261995
311261996
311261997
...

result:

ok 299997 lines

Test #139:

score: 0
Accepted
time: 727ms
memory: 70672kb

input:

300000 300000 300000
99865 250005 99866 250006
227258 162865 227259 162865
163290 48583 163290 48584
242284 154453 242285 154453
123236 4358 123236 4358
192650 269385 192651 269385
252167 47528 252168 47528
187876 197149 187876 197149
32021 159067 32022 159067
266478 65383 266478 65384
79510 134064 ...

output:

300412720
300412721
300412722
300412723
300412724
300412725
300412726
300412727
300412728
300412729
300412730
300412731
300412732
300412733
300412734
300412735
300412736
300412737
300412738
300412739
300412740
300412741
300412742
300412743
300412744
300412745
300412746
300412747
300412748
300412749
...

result:

ok 300001 lines

Test #140:

score: 0
Accepted
time: 840ms
memory: 71044kb

input:

299998 300000 299999
235434 218463 235435 218464
278853 274871 278853 274872
145854 253363 145854 253364
155939 92538 155939 92538
152157 170820 152158 170820
99515 46009 99515 46009
270513 275019 270513 275020
248049 250763 248049 250763
269230 199787 269230 199788
226516 101406 226516 101407
39119...

output:

326478816
326478817
326478816
326478817
326478818
326478819
326478820
326478821
326478822
326478823
326478824
326478825
326478826
326478827
326478828
326478829
326478830
326478831
326478832
326478833
326478834
326478835
326478836
326478837
326478838
326478839
326478840
326478841
326478842
326478843
...

result:

ok 300000 lines

Test #141:

score: 0
Accepted
time: 803ms
memory: 70792kb

input:

300000 299999 300000
89694 89164 89694 89164
139594 1538 139594 1538
147134 146345 147134 146345
63365 176544 63366 176544
116267 91071 116268 91071
23011 55638 23012 55639
98767 264211 98767 264212
56897 297910 56898 297911
197816 59064 197816 59064
138427 10387 138428 10388
39621 37733 39621 37734...

output:

170009202
170009203
170009204
170009205
170009206
170009207
170009208
170009209
170009210
170009211
170009212
170009213
170009214
170009215
170009216
170009217
170009218
170009219
170009220
170009221
170009222
170009223
170009224
170009225
170009226
170009227
170009228
170009229
170009230
170009231
...

result:

ok 300001 lines

Test #142:

score: 0
Accepted
time: 740ms
memory: 70828kb

input:

299996 299999 299999
224002 140238 224002 140238
253787 67598 253788 67599
190989 75728 190989 75728
246542 203049 246543 203049
96660 225452 96660 225452
66754 144335 66754 144335
231385 258884 231385 258885
172719 255145 172720 255146
51987 276519 51988 276520
104475 12651 104475 12651
293324 1990...

output:

159531211
159531212
159531213
159531214
159531215
159531216
159531217
159531218
159531219
159531220
159531221
159531222
159531223
159531224
159531225
159531226
159531227
159531228
159531229
159531230
159531231
159531232
159531233
159531234
159531235
159531236
159531237
159531238
159531239
159531240
...

result:

ok 300000 lines

Test #143:

score: 0
Accepted
time: 750ms
memory: 70472kb

input:

299996 300000 299997
107107 80295 107108 80296
285859 154978 285859 154978
271200 99051 271201 99052
128026 49088 128027 49089
17049 263498 17049 263499
57885 292832 57886 292833
107553 215163 107554 215164
54378 285850 54378 285850
99185 180494 99185 180494
232996 235321 232997 235321
109554 189914...

output:

170262081
170262082
170262083
170262084
170262085
170262086
170262087
170262088
170262089
170262090
170262091
170262092
170262093
170262094
170262095
170262096
170262097
170262098
170262099
170262100
170262101
170262102
170262103
170262104
170262105
170262106
170262107
170262108
170262109
170262110
...

result:

ok 299998 lines

Test #144:

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

input:

75000 0 299996
51866 37904
32233 37904
5476 15676
42627 33321
35169 37904
28044 1089
5476 33675
5476 31475
29520 37904
35465 1089
5476 72880
63706 1089
52980 37904
42627 27042
5476 20301
61967 37904
42627 69405
62815 1089
22298 1089
42627 46333
42627 28637
5476 67802
72119 37904
12619 1089
72980 379...

output:

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
10...

result:

ok 299997 lines

Test #145:

score: 0
Accepted
time: 866ms
memory: 78784kb

input:

300000 300000 300000
251789 66282 256844 66283
252100 203114 252104 203118
28476 73767 300000 73767
253867 132456 253868 132458
191268 2832 191272 2832
58423 279835 58423 279836
276264 50316 276267 50320
50109 79032 300000 79034
33536 222606 33539 222606
241090 8839 241092 8839
144883 299429 144884 ...

output:

30959466302
30959466301
30959466302
30959466303
30959466304
30959466305
30959466306
30959466307
30959466308
30959466309
30959466310
30959466309
30959466310
30959466311
30959466312
30959466311
30959466310
30959466309
30959466310
30959466311
30959466312
30959466311
30959466310
30959466311
30959466312
...

result:

ok 300001 lines

Test #146:

score: 0
Accepted
time: 904ms
memory: 85232kb

input:

299995 300000 300000
169837 67747 171022 67747
169871 267713 170993 267715
287925 75511 287929 75513
254524 274869 254527 274871
169226 123891 171689 123892
170169 278342 170722 278347
169874 51684 170984 51686
242877 222479 242877 222481
165555 235927 175376 235927
294673 199735 294673 199739
18767...

output:

877899013
877899014
877899015
877899016
877899017
877899018
877899019
877899020
877899021
877899022
877899023
877899024
877899025
877899026
877899027
877899028
877899029
877899030
877899031
877899032
877899033
877899034
877899035
877899036
877899037
877899038
877899039
877899040
877899041
877899042
...

result:

ok 300001 lines