QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#857270#2164. Landscape GeneratorZhangYiDeAC ✓124ms6784kbC++171.2kb2025-01-15 14:46:432025-01-15 14:46:44

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 5708kb

input:

71 1487
H 20 68
D 22 52
H 39 55
V 8 58
V 56 61
V 1 30
V 3 11
V 40 49
H 4 24
H 27 68
H 28 36
R 7 30
V 4 42
V 9 24
D 7 15
R 2 31
V 29 51
R 9 11
V 69 69
R 65 70
H 2 56
V 21 22
D 23 35
H 23 47
D 59 60
D 16 50
V 3 26
V 64 70
H 28 31
R 24 25
H 4 70
D 1 42
D 39 39
D 11 33
V 16 68
H 53 71
V 2 71
H 26 47
H 5...

output:

-2
4
12
30
48
60
68
85
99
89
79
64
49
33
9
-12
-27
-20
-39
-54
-71
-85
-89
-85
-88
-97
-102
-100
-84
-64
-48
-25
-19
-20
-19
-12
6
23
36
48
61
77
96
105
106
106
99
79
65
59
56
49
45
35
28
22
16
19
14
8
6
9
13
10
1
-8
-12
-3
4
-5
2

result:

ok 71 lines

Test #2:

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

input:

165231 181869
V 97560 131310
R 4568 154037
R 84344 137004
H 46615 141921
D 93109 94547
R 32071 94168
R 89189 111905
D 1300 93577
V 105118 165223
D 110827 147567
V 3993 32756
D 143493 154640
V 42532 83628
R 48218 132610
R 9781 68504
R 70797 110884
H 131654 143886
D 92398 131461
H 82803 154957
H 22377...

output:

-1
-2
-2
1
1
6
11
15
19
23
28
34
43
48
53
60
69
78
86
93
101
106
115
122
130
137
144
155
164
175
186
199
213
224
233
243
252
261
273
285
299
310
321
333
345
356
365
378
393
406
419
432
443
454
468
483
499
513
527
539
551
564
581
597
617
637
655
672
688
705
720
737
753
768
783
799
817
832
847
862
878...

result:

ok 165231 lines

Test #3:

score: 0
Accepted
time: 112ms
memory: 6736kb

input:

200000 200000
D 1 200000
D 2 200000
D 3 200000
D 4 200000
D 5 200000
D 6 200000
D 7 200000
D 8 200000
D 9 200000
D 10 200000
D 11 200000
D 12 200000
D 13 200000
D 14 200000
D 15 200000
D 16 200000
D 17 200000
D 18 200000
D 19 200000
D 20 200000
D 21 200000
D 22 200000
D 23 200000
D 24 200000
D 25 20...

output:

-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
-...

result:

ok 200000 lines

Test #4:

score: 0
Accepted
time: 118ms
memory: 6784kb

input:

200000 200000
H 1 200000
H 2 200000
H 3 200000
H 4 200000
H 5 200000
H 6 200000
H 7 200000
H 8 200000
H 9 200000
H 10 200000
H 11 200000
H 12 200000
H 13 200000
H 14 200000
H 15 200000
H 16 200000
H 17 200000
H 18 200000
H 19 200000
H 20 200000
H 21 200000
H 22 200000
H 23 200000
H 24 200000
H 25 20...

output:

1
3
6
10
15
21
28
36
45
55
66
78
91
105
120
136
153
171
190
210
231
253
276
300
325
351
378
406
435
465
496
528
561
595
630
666
703
741
780
820
861
903
946
990
1035
1081
1128
1176
1225
1275
1326
1378
1431
1485
1540
1596
1653
1711
1770
1830
1891
1953
2016
2080
2145
2211
2278
2346
2415
2485
2556
2628
...

result:

ok 200000 lines

Test #5:

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

input:

200000 200000
V 1625 55563
H 79826 82981
R 8424 36593
D 7024 40450
D 42892 122959
H 28535 87628
V 3905 12050
R 2742 35960
H 26540 184748
R 41873 128600
H 91892 97270
D 17106 22865
V 47844 186138
H 2661 52085
D 28419 119367
R 728 1218
R 23175 143975
H 52990 126801
V 150677 172752
D 79 459
V 137596 15...

output:

2
-3
-4
0
-3
0
2
5
12
15
21
20
25
31
38
37
42
48
54
57
63
68
67
69
67
66
69
69
66
70
71
72
79
90
100
102
107
118
125
129
133
134
136
144
145
148
156
163
164
172
181
188
196
198
203
204
206
205
205
201
200
203
201
198
198
197
191
189
184
181
174
166
153
140
130
123
118
111
101
99
101
101
105
103
105
...

result:

ok 200000 lines

Test #6:

score: 0
Accepted
time: 94ms
memory: 6656kb

input:

200000 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
R 1 200000
...

output:

200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000
200000...

result:

ok 200000 lines

Test #7:

score: 0
Accepted
time: 109ms
memory: 6656kb

input:

200000 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
D 1 200000
...

output:

-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200000
-200...

result:

ok 200000 lines

Test #8:

score: 0
Accepted
time: 105ms
memory: 6656kb

input:

200000 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
H 1 200000
...

output:

200000
400000
600000
800000
1000000
1200000
1400000
1600000
1800000
2000000
2200000
2400000
2600000
2800000
3000000
3200000
3400000
3600000
3800000
4000000
4200000
4400000
4600000
4800000
5000000
5200000
5400000
5600000
5800000
6000000
6200000
6400000
6600000
6800000
7000000
7200000
7400000
7600000
...

result:

ok 200000 lines

Test #9:

score: 0
Accepted
time: 98ms
memory: 6784kb

input:

200000 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
V 1 200000
...

output:

-200000
-400000
-600000
-800000
-1000000
-1200000
-1400000
-1600000
-1800000
-2000000
-2200000
-2400000
-2600000
-2800000
-3000000
-3200000
-3400000
-3600000
-3800000
-4000000
-4200000
-4400000
-4600000
-4800000
-5000000
-5200000
-5400000
-5600000
-5800000
-6000000
-6200000
-6400000
-6600000
-680000...

result:

ok 200000 lines

Test #10:

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

input:

1 0

output:

0

result:

ok single line: '0'

Test #11:

score: 0
Accepted
time: 30ms
memory: 6784kb

input:

200000 0

output:

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

result:

ok 200000 lines

Test #12:

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

input:

1 200000
R 1 1
D 1 1
H 1 1
V 1 1
R 1 1
D 1 1
H 1 1
V 1 1
R 1 1
D 1 1
H 1 1
V 1 1
R 1 1
D 1 1
H 1 1
V 1 1
R 1 1
D 1 1
H 1 1
V 1 1
R 1 1
D 1 1
H 1 1
V 1 1
R 1 1
D 1 1
H 1 1
V 1 1
R 1 1
D 1 1
H 1 1
V 1 1
R 1 1
D 1 1
H 1 1
V 1 1
R 1 1
D 1 1
H 1 1
V 1 1
R 1 1
D 1 1
H 1 1
V 1 1
R 1 1
D 1 1
H 1 1
V 1 1
R 1...

output:

0

result:

ok single line: '0'

Test #13:

score: 0
Accepted
time: 121ms
memory: 6784kb

input:

200000 200000
R 100000 100000
D 100000 100000
H 100000 100000
V 100000 100000
R 100000 100000
D 100000 100000
H 100000 100000
V 100000 100000
R 100000 100000
D 100000 100000
H 100000 100000
V 100000 100000
R 100000 100000
D 100000 100000
H 100000 100000
V 100000 100000
R 100000 100000
D 100000 10000...

output:

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

result:

ok 200000 lines

Test #14:

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

input:

200000 1
R 1 200000

output:

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

result:

ok 200000 lines

Test #15:

score: 0
Accepted
time: 25ms
memory: 6528kb

input:

200000 1
D 1 200000

output:

-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
...

result:

ok 200000 lines

Test #16:

score: 0
Accepted
time: 26ms
memory: 6784kb

input:

200000 1
H 1 200000

output:

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
102
...

result:

ok 200000 lines

Test #17:

score: 0
Accepted
time: 28ms
memory: 6736kb

input:

200000 1
V 1 200000

output:

-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
-...

result:

ok 200000 lines

Test #18:

score: 0
Accepted
time: 30ms
memory: 6784kb

input:

200000 2
R 1 200000
D 1 200000

output:

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

result:

ok 200000 lines

Test #19:

score: 0
Accepted
time: 28ms
memory: 6656kb

input:

200000 2
H 1 200000
V 1 200000

output:

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

result:

ok 200000 lines

Test #20:

score: 0
Accepted
time: 92ms
memory: 6784kb

input:

200000 200000
R 1 200000
D 1 200000
R 1 200000
D 1 200000
R 1 200000
D 1 200000
R 1 200000
D 1 200000
R 1 200000
D 1 200000
R 1 200000
D 1 200000
R 1 200000
D 1 200000
R 1 200000
D 1 200000
R 1 200000
D 1 200000
R 1 200000
D 1 200000
R 1 200000
D 1 200000
R 1 200000
D 1 200000
R 1 200000
D 1 200000
...

output:

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

result:

ok 200000 lines

Test #21:

score: 0
Accepted
time: 96ms
memory: 6764kb

input:

200000 133334
H 1 66667
H 2 66668
H 3 66669
H 4 66670
H 5 66671
H 6 66672
H 7 66673
H 8 66674
H 9 66675
H 10 66676
H 11 66677
H 12 66678
H 13 66679
H 14 66680
H 15 66681
H 16 66682
H 17 66683
H 18 66684
H 19 66685
H 20 66686
H 21 66687
H 22 66688
H 23 66689
H 24 66690
H 25 66691
H 26 66692
H 27 6669...

output:

1
3
6
10
15
21
28
36
45
55
66
78
91
105
120
136
153
171
190
210
231
253
276
300
325
351
378
406
435
465
496
528
561
595
630
666
703
741
780
820
861
903
946
990
1035
1081
1128
1176
1225
1275
1326
1378
1431
1485
1540
1596
1653
1711
1770
1830
1891
1953
2016
2080
2145
2211
2278
2346
2415
2485
2556
2628
...

result:

ok 200000 lines

Test #22:

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

input:

199999 100000
R 1 1
R 3 3
R 5 5
R 7 7
R 9 9
R 11 11
R 13 13
R 15 15
R 17 17
R 19 19
R 21 21
R 23 23
R 25 25
R 27 27
R 29 29
R 31 31
R 33 33
R 35 35
R 37 37
R 39 39
R 41 41
R 43 43
R 45 45
R 47 47
R 49 49
R 51 51
R 53 53
R 55 55
R 57 57
R 59 59
R 61 61
R 63 63
R 65 65
R 67 67
R 69 69
R 71 71
R 73 73
...

output:

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

result:

ok 199999 lines

Test #23:

score: 0
Accepted
time: 25ms
memory: 6784kb

input:

199700 999
V 1 100
V 201 300
V 401 500
V 601 700
V 801 900
V 1001 1100
V 1201 1300
V 1401 1500
V 1601 1700
V 1801 1900
V 2001 2100
V 2201 2300
V 2401 2500
V 2601 2700
V 2801 2900
V 3001 3100
V 3201 3300
V 3401 3500
V 3601 3700
V 3801 3900
V 4001 4100
V 4201 4300
V 4401 4500
V 4601 4700
V 4801 4900
V...

output:

-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
-50
-49
-48
-47
-46
-45
-44
-43
-42
-41
-40
-39
-38
-37
-36
-35
-34
-33
-32
-31
-30
-29
-28
-27
-26
-25
-24
-...

result:

ok 199700 lines

Test #24:

score: 0
Accepted
time: 29ms
memory: 6784kb

input:

199800 1998
H 1 100
H 201 300
H 401 500
H 601 700
H 801 900
H 1001 1100
H 1201 1300
H 1401 1500
H 1601 1700
H 1801 1900
H 2001 2100
H 2201 2300
H 2401 2500
H 2601 2700
H 2801 2900
H 3001 3100
H 3201 3300
H 3401 3500
H 3601 3700
H 3801 3900
H 4001 4100
H 4201 4300
H 4401 4500
H 4601 4700
H 4801 4900
...

output:

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

result:

ok 199800 lines

Test #25:

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

input:

200000 200000
H 139738 157937
H 14461 148763
R 148767 152498
D 67222 151899
R 140311 195965
D 5441 83519
R 41840 122570
D 26569 93772
D 147337 171355
V 56620 76694
H 1426 178472
R 47373 96877
V 145785 196236
H 137552 188607
V 96123 121601
R 85527 116507
D 109353 161232
V 104857 139343
H 59121 72221
...

output:

1
3
0
-1
-4
-9
-11
-15
-21
-25
-30
-35
-42
-47
-52
-57
-60
-63
-65
-69
-71
-75
-78
-83
-89
-97
-105
-111
-116
-118
-119
-119
-118
-120
-122
-127
-131
-132
-133
-135
-137
-139
-141
-141
-141
-139
-137
-133
-129
-125
-120
-114
-106
-99
-96
-89
-83
-75
-67
-63
-61
-57
-55
-54
-51
-46
-42
-37
-28
-22
-1...

result:

ok 200000 lines

Test #26:

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

input:

183574 450
D 32227 106420
D 102496 109003
R 27747 138654
H 76938 128206
R 17012 67375
D 64576 108886
D 57811 111554
D 82620 89333
V 47365 182378
D 28313 102451
V 7240 145535
R 30708 106253
V 92924 113024
R 17740 75122
R 89070 99334
V 118221 119869
R 79779 139100
D 8387 53196
D 152195 153851
D 111384...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

ok 183574 lines

Test #27:

score: 0
Accepted
time: 45ms
memory: 3584kb

input:

852 133796
H 1 760
D 782 830
R 30 113
V 61 89
D 434 803
H 591 679
V 323 816
V 472 725
D 94 710
H 75 136
D 113 391
R 327 569
H 363 639
H 218 736
D 218 246
R 431 808
H 303 456
R 151 717
D 416 418
H 171 831
R 462 821
V 344 597
V 286 660
H 356 491
R 137 621
V 89 697
D 272 352
R 538 642
D 401 675
H 327 5...

output:

-4
-27
-44
-26
-14
-8
1
-13
-22
-67
-124
-187
-237
-292
-315
-335
-353
-346
-352
-350
-363
-372
-398
-426
-444
-471
-494
-518
-523
-534
-555
-573
-585
-606
-643
-671
-704
-744
-793
-815
-820
-831
-880
-892
-932
-991
-1065
-1139
-1207
-1240
-1265
-1323
-1376
-1399
-1449
-1466
-1470
-1429
-1392
-1333
...

result:

ok 852 lines

Test #28:

score: 0
Accepted
time: 26ms
memory: 5632kb

input:

130891 9498
V 19793 62510
V 16471 67549
H 69631 92480
D 59556 93615
H 2479 65905
H 36049 55349
H 41162 72767
D 53915 90728
V 26691 42520
V 78522 88812
R 70895 128244
R 44375 86345
R 7927 57380
R 21187 39866
V 29263 103229
D 53957 130230
V 57573 96373
D 10624 29484
D 92834 94239
D 56199 91375
R 21305...

output:

0
-1
-2
-3
-4
-5
-6
-8
-9
-10
-11
-13
-16
-19
-22
-25
-28
-31
-34
-37
-40
-43
-46
-49
-52
-55
-59
-62
-65
-68
-71
-74
-77
-80
-84
-86
-88
-90
-92
-94
-96
-98
-101
-104
-107
-110
-113
-116
-119
-122
-125
-129
-133
-137
-142
-146
-150
-154
-158
-162
-166
-170
-174
-178
-182
-186
-190
-194
-198
-202
-2...

result:

ok 130891 lines

Test #29:

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

input:

1261 37
V 664 1088
V 663 768
R 545 945
V 66 722
V 673 1075
V 75 444
V 49 810
R 528 581
H 85 1057
R 298 339
D 56 907
R 522 1107
H 670 726
D 841 872
H 449 1230
D 461 913
V 349 1235
V 346 718
R 2 457
V 144 959
R 651 931
H 637 689
D 224 234
H 99 811
V 184 566
H 94 1042
R 340 797
D 191 461
H 279 1112
V 6...

output:

0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-29
-32
-35
-38
-41
-44
-47
-51
-54
-57
-60
-63
-66
-69
-72
-75
-78
-82
-86
-90
-94
-98
-102
-106
-110
-114
-119
-124
-129
-134
-139
-144
-149
-154
-159
-164
-168
...

result:

ok 1261 lines

Test #30:

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

input:

1474 15
V 496 1040
V 739 821
H 274 1223
H 318 1167
R 661 1269
H 89 1187
H 1007 1141
D 199 833
H 842 1212
V 812 1306
D 643 1231
D 665 1088
H 854 1387
D 286 1084
R 964 1049

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
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
4...

result:

ok 1474 lines

Test #31:

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

input:

17 137
V 6 17
V 7 14
R 3 11
V 13 17
H 11 11
D 5 13
V 8 11
R 2 14
H 2 14
H 7 11
R 10 17
D 8 14
V 4 14
D 7 12
H 3 16
D 7 11
R 10 14
D 2 12
R 2 2
D 1 11
H 15 16
H 3 14
V 16 17
H 6 11
D 7 11
D 9 11
D 12 16
R 1 2
R 10 11
V 1 17
R 13 16
V 1 5
V 14 17
H 9 11
H 7 8
H 1 4
R 3 6
R 1 5
V 7 17
R 1 13
D 2 13
D 2...

output:

2
3
7
12
10
14
12
19
17
6
-7
-10
-13
-13
-15
-11
-6

result:

ok 17 lines

Test #32:

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

input:

419 1990
H 166 376
V 71 211
V 69 317
V 68 358
V 280 360
D 69 308
H 339 402
H 75 390
R 123 175
R 8 155
V 361 401
R 93 332
D 261 324
V 64 307
R 114 174
D 195 281
D 198 226
H 17 57
R 56 323
D 144 327
V 177 221
R 46 110
R 127 233
R 81 287
V 282 324
D 27 127
D 169 408
H 66 337
V 163 342
D 158 247
H 132 1...

output:

1
2
1
6
7
2
5
13
15
18
20
16
10
5
0
-9
-15
-22
-28
-37
-54
-62
-76
-88
-102
-110
-125
-135
-142
-149
-157
-170
-177
-182
-189
-200
-209
-218
-229
-248
-263
-283
-304
-322
-343
-358
-373
-387
-399
-407
-422
-431
-447
-458
-471
-477
-485
-491
-502
-518
-537
-561
-582
-605
-621
-636
-646
-664
-684
-705...

result:

ok 419 lines

Test #33:

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

input:

252 313
D 48 110
V 23 211
H 8 50
V 98 181
R 29 193
D 211 243
R 55 135
V 89 92
R 69 242
H 57 128
H 26 184
V 138 234
D 44 146
R 196 232
V 23 158
D 90 127
V 88 194
H 225 227
R 183 227
R 39 181
D 199 230
V 45 208
D 115 218
R 66 109
R 195 231
R 72 226
H 118 182
D 85 131
V 61 185
R 85 115
V 18 200
V 102 2...

output:

2
3
4
3
2
3
0
1
4
8
12
17
22
25
30
33
36
37
43
44
45
44
40
38
34
32
31
30
29
27
28
30
29
27
27
30
32
35
36
30
26
24
18
11
4
-5
-17
-29
-36
-44
-54
-62
-68
-77
-85
-91
-97
-100
-104
-108
-113
-115
-117
-120
-121
-120
-121
-121
-123
-124
-124
-124
-123
-122
-124
-123
-122
-118
-119
-119
-123
-128
-137...

result:

ok 252 lines

Test #34:

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

input:

88 12
H 33 84
V 6 53
V 9 10
D 36 80
V 6 73
R 1 38
R 26 29
V 8 86
V 64 84
H 28 77
D 59 88
R 32 59

output:

1
1
1
1
1
-1
-3
-6
-10
-13
-15
-18
-21
-24
-27
-30
-33
-36
-39
-42
-45
-48
-51
-54
-57
-59
-62
-64
-66
-68
-68
-67
-66
-65
-64
-64
-63
-62
-62
-60
-57
-54
-51
-48
-45
-42
-39
-34
-29
-24
-19
-14
-10
-7
-5
-3
-1
1
1
0
0
0
0
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-11
-11
-11
-11
-10
-9
-7
-6
-5
-4
-3
-2
-...

result:

ok 88 lines

Test #35:

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

input:

20 36
D 8 20
D 9 16
D 8 9
V 19 20
V 1 4
V 12 18
D 2 5
D 3 10
R 1 20
V 5 17
H 7 9
R 1 15
H 1 18
V 7 14
D 11 15
D 5 12
D 12 15
V 1 2
H 16 20
H 13 14
V 6 18
V 5 7
R 14 14
D 13 19
D 4 11
V 6 11
R 4 13
R 3 19
R 12 18
H 11 17
R 2 3
R 2 11
H 8 16
D 15 18
R 7 20
V 3 16

output:

1
2
3
3
1
-2
-3
-6
-10
-11
-10
-7
-4
-2
-5
-2
1
3
2
1

result:

ok 20 lines

Test #36:

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

input:

1 1
D 1 1

output:

-1

result:

ok single line: '-1'

Test #37:

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

input:

1 1
H 1 1

output:

1

result:

ok single line: '1'

Test #38:

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

input:

1 1
R 1 1

output:

1

result:

ok single line: '1'

Test #39:

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

input:

1 1
V 1 1

output:

-1

result:

ok single line: '-1'

Test #40:

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

input:

2 1
R 1 1

output:

1
0

result:

ok 2 lines

Test #41:

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

input:

2 1
V 1 1

output:

-1
0

result:

ok 2 lines

Test #42:

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

input:

2 1
D 1 2

output:

-1
-1

result:

ok 2 lines

Test #43:

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

input:

2 1
H 1 2

output:

1
1

result:

ok 2 lines

Test #44:

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

input:

2 1
D 2 2

output:

0
-1

result:

ok 2 lines

Test #45:

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

input:

2 1
H 2 2

output:

0
1

result:

ok 2 lines

Test #46:

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

input:

2 1
R 2 2

output:

0
1

result:

ok 2 lines

Test #47:

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

input:

2 1
V 2 2

output:

0
-1

result:

ok 2 lines

Test #48:

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

input:

3 1
H 1 1

output:

1
0
0

result:

ok 3 lines

Test #49:

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

input:

3 1
R 1 1

output:

1
0
0

result:

ok 3 lines

Test #50:

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

input:

3 1
D 1 2

output:

-1
-1
0

result:

ok 3 lines

Test #51:

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

input:

3 1
V 1 2

output:

-1
-1
0

result:

ok 3 lines

Test #52:

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

input:

3 1
R 1 3

output:

1
1
1

result:

ok 3 lines

Test #53:

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

input:

3 1
V 1 3

output:

-1
-2
-1

result:

ok 3 lines

Test #54:

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

input:

3 1
R 2 2

output:

0
1
0

result:

ok 3 lines

Test #55:

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

input:

3 1
V 2 2

output:

0
-1
0

result:

ok 3 lines

Test #56:

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

input:

3 1
D 2 3

output:

0
-1
-1

result:

ok 3 lines

Test #57:

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

input:

3 1
H 2 3

output:

0
1
1

result:

ok 3 lines

Test #58:

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

input:

5 20
V 3 5
H 1 4
H 1 1
V 1 1
R 1 5
R 1 2
R 2 2
D 2 3
V 2 2
R 2 2
V 1 5
V 3 3
H 2 5
H 3 4
V 1 2
D 4 5
R 1 5
R 3 5
V 1 3
H 3 3

output:

1
1
2
2
1

result:

ok 5 lines

Test #59:

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

input:

10 30
H 1 3
H 5 8
H 1 1
V 2 2
V 1 2
V 1 8
V 7 7
H 1 4
H 4 9
H 1 1
V 5 5
V 1 6
H 1 7
H 3 3
H 1 7
V 1 4
H 3 5
V 1 1
V 4 8
H 6 7
V 4 7
V 3 7
V 9 10
V 2 5
H 1 5
V 1 7
H 2 2
H 2 6
H 6 7
H 2 5

output:

1
2
4
1
-4
-1
1
1
0
-1

result:

ok 10 lines

Test #60:

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

input:

42 42
H 18 42
R 2 3
R 4 9
V 12 39
H 13 18
D 17 38
H 15 31
H 20 25
R 1 18
V 34 38
H 20 25
R 2 28
D 1 14
V 2 2
V 19 29
R 17 42
H 4 4
R 13 24
H 34 38
H 7 8
R 18 40
D 4 16
R 4 13
H 9 12
H 12 15
H 27 37
R 10 10
R 19 19
D 33 33
R 11 40
H 6 17
D 17 21
V 4 24
V 3 15
R 21 37
V 26 26
V 1 1
R 5 5
H 2 11
D 15 1...

output:

-1
2
3
3
2
1
1
-1
-4
-2
-2
-4
-5
-7
-6
-6
-7
-5
-5
-2
2
6
7
4
2
0
4
7
9
12
12
12
10
10
9
8
7
5
6
6
3
2

result:

ok 42 lines

Test #61:

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

input:

7041 450
V 404 3733
D 1028 1764
D 4644 6751
V 2560 6974
H 1181 2450
D 2493 6353
V 614 2717
D 110 1108
R 247 1009
R 221 1539
R 96 1757
V 4912 6589
V 995 3920
V 26 3577
V 2082 4426
D 118 3331
D 549 6013
V 1082 1868
D 1619 4208
V 145 758
V 77 564
V 274 996
D 1474 2339
D 444 5865
R 1736 6353
R 560 1953
...

output:

0
0
0
0
-1
-1
-1
1
5
9
12
15
18
21
22
22
23
22
24
26
28
30
32
34
36
37
38
38
38
39
38
37
36
35
34
30
30
30
31
32
32
32
32
32
32
31
28
25
22
20
20
21
22
23
26
28
30
32
34
36
38
39
38
36
34
32
31
29
27
23
19
15
10
6
1
-4
-11
-18
-25
-31
-37
-43
-49
-55
-59
-62
-66
-70
-74
-77
-80
-83
-86
-89
-91
-95
-...

result:

ok 7041 lines

Test #62:

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

input:

8625 195
D 1662 2489
H 801 4859
V 861 5377
R 1235 8189
V 2049 3562
D 688 820
V 725 2251
H 1451 6343
R 4916 5359
R 6444 7471
R 2876 2886
D 108 422
V 2573 6410
H 3413 4409
R 2919 3122
R 194 5738
V 610 5340
V 759 1165
H 290 354
V 98 248
H 1078 2512
D 4063 5780
D 6004 6158
H 1457 2456
H 595 786
R 595 66...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
0
1
2
3
5
8
11
14
17
20
23
26
29
32
35
38
41
44
47
50
53
56
59
62
65
68
71
74
77
80
83
86
89
92
95
98
101
104
107
110
113
116
119
122
125
128
131
135
138
141
144
147
150
153
156
159
162
165
168
171
174
177
179
181
183
184...

result:

ok 8625 lines

Test #63:

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

input:

9993 681
D 2779 8664
R 509 6988
R 1097 1159
R 3193 4577
V 1304 7723
H 63 4336
V 2095 6738
D 1077 4375
V 958 2093
H 2085 4269
R 6240 6652
V 546 856
D 4399 5783
D 3771 4510
R 1673 3107
H 4803 8158
V 3548 4718
R 2083 2570
R 4558 7052
H 6856 9452
V 42 1406
D 4379 5767
H 20 134
V 1040 7691
D 2322 3902
D ...

output:

0
1
2
2
2
3
4
5
6
7
8
9
10
11
12
13
15
18
20
21
22
22
22
22
22
22
22
22
22
22
21
19
17
16
15
14
13
13
12
12
12
9
7
5
3
1
0
-1
-1
-2
-3
-2
-1
-1
1
4
8
11
13
16
18
22
25
29
33
37
41
42
45
47
50
54
58
62
66
70
74
74
76
77
76
75
74
73
71
69
67
64
62
61
59
57
55
53
50
49
48
47
46
45
44
42
41
40
40
40
41
...

result:

ok 9993 lines

Test #64:

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

input:

1508 856
R 336 957
D 211 727
R 608 1264
V 1 2
V 1053 1276
R 571 903
R 1062 1373
V 213 594
H 124 157
V 15 96
D 274 725
V 765 1432
H 94 974
D 35 220
H 897 1157
V 960 1230
R 401 1243
D 74 987
H 219 994
R 180 1354
D 520 1019
V 152 225
H 11 20
D 1123 1366
V 1078 1403
H 380 941
V 165 289
V 442 466
H 852 1...

output:

-3
-3
-5
-9
-15
-19
-23
-23
-25
-24
-22
-21
-22
-24
-30
-34
-39
-48
-55
-61
-69
-74
-79
-83
-89
-96
-106
-116
-127
-137
-146
-155
-163
-170
-178
-186
-194
-200
-208
-216
-227
-240
-251
-260
-269
-279
-292
-305
-314
-326
-337
-346
-357
-365
-373
-378
-382
-386
-390
-395
-400
-403
-404
-405
-406
-408
...

result:

ok 1508 lines

Test #65:

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

input:

8578 294
H 2325 5936
V 90 2699
R 1432 4274
D 469 835
V 1111 1314
V 1960 5119
H 190 1120
V 2114 2254
D 4819 5748
V 3641 3961
D 395 584
V 3246 4707
D 1789 5202
D 3069 7091
R 925 2052
R 1570 7401
D 453 3574
R 176 2320
R 5374 6253
D 231 256
R 3180 7989
H 321 2966
H 1117 1223
V 1544 2106
D 2097 4111
H 36...

output:

0
0
1
2
3
4
5
6
7
8
9
11
13
14
16
18
20
22
23
24
23
23
22
21
19
16
14
13
12
11
10
9
8
7
5
4
2
1
0
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-18
-20
-22
-24
-26
-28
-30
-32
-34
-36
-38
-40
-42
-44
-46
-49
-52
-55
-58
-61
-65
-69
-73
-77
-81
-85
-89
-93
-97
-101
-106
-111
-116
-121
-127
-...

result:

ok 8578 lines

Test #66:

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

input:

1751 749
R 154 277
H 96 518
D 626 1208
R 38 655
D 525 927
H 106 1481
D 645 781
V 91 183
R 128 190
R 232 832
H 243 767
R 148 539
D 1040 1088
H 135 1312
R 314 509
R 1381 1669
R 921 1640
V 201 818
R 548 661
H 193 568
V 59 404
D 608 1345
R 18 49
R 870 1137
V 119 1701
R 344 1394
V 501 1413
D 855 1017
H 1...

output:

0
4
6
7
9
9
14
18
24
31
36
42
48
54
59
62
66
73
79
86
94
100
106
113
118
121
124
130
131
133
136
143
148
153
160
165
170
177
186
195
201
204
207
208
208
208
209
209
213
215
219
220
222
221
218
216
215
215
212
210
208
205
203
201
197
198
196
193
187
180
176
174
170
168
169
170
171
173
177
181
185
188...

result:

ok 1751 lines

Test #67:

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

input:

8729 348
H 270 300
D 1630 3218
V 1249 6643
H 7051 7532
D 1986 3873
D 4340 4671
H 299 438
V 75 340
R 1636 2882
V 202 2289
R 2518 7402
D 1688 2423
R 1566 2209
D 135 175
D 251 836
D 1468 3794
V 2599 3967
D 4548 4724
R 4713 7572
R 323 5597
H 1349 1450
D 4808 8705
H 4940 6983
V 4851 5517
H 2682 4046
V 36...

output:

0
0
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
3
3
1
-1
-3
-5
-7
-8
-10
-12
-14
-15
-15
-16
-17
-18
-18
-17
-15
-15
-14
-13
-12
-12
-11
-10
-9
-8
-7
-6
-5
-4
-2
0
2
5
7
9
11
13
15
17
17
17
18
18
17
17
17...

result:

ok 8729 lines

Test #68:

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

input:

2396 513
D 200 681
V 275 577
H 269 460
D 2057 2229
D 358 505
D 1175 2247
H 336 413
H 338 523
H 333 397
V 32 286
H 439 880
R 635 658
H 471 2126
R 1885 2286
R 1701 1787
V 1588 1858
D 1528 1661
V 207 244
D 819 1701
R 1370 2134
R 1002 1298
R 532 1932
H 1912 2152
V 1524 2078
D 10 230
V 1814 1964
R 442 19...

output:

1
1
2
4
6
7
11
15
18
20
23
24
25
24
23
20
17
14
11
7
4
1
-4
-9
-16
-21
-28
-34
-39
-43
-46
-52
-59
-66
-73
-81
-88
-96
-104
-112
-120
-128
-139
-149
-159
-168
-177
-187
-199
-210
-219
-228
-237
-247
-258
-270
-284
-295
-304
-314
-322
-330
-339
-348
-356
-365
-374
-382
-389
-395
-401
-406
-412
-418
-...

result:

ok 2396 lines

Test #69:

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

input:

1000 200000
H 54 302
R 14 69
H 332 994
R 24 80
D 208 483
V 323 639
R 2 3
H 419 497
V 624 931
R 31 821
R 193 418
R 455 543
V 299 352
R 62 72
R 23 50
D 294 647
R 77 194
R 231 364
H 535 864
H 140 518
R 45 108
D 385 569
V 594 865
H 810 982
H 117 237
H 154 736
H 251 789
D 877 901
D 609 689
V 398 575
D 88...

output:

-24
72
157
178
176
123
86
-23
-108
-103
-209
-180
-248
-294
-333
-333
-348
-446
-537
-590
-762
-970
-1125
-1238
-1363
-1479
-1540
-1587
-1630
-1794
-1908
-1997
-2087
-2148
-2248
-2385
-2557
-2722
-2837
-2950
-3044
-3194
-3324
-3414
-3498
-3596
-3743
-3829
-3929
-4059
-4158
-4262
-4373
-4513
-4686
-4...

result:

ok 1000 lines