QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#43780#2490. Five-pointed QueriesSuffixTreeAC ✓1305ms7652kbC++172.1kb2022-08-10 21:37:162022-08-10 21:37:17

详细

Test #1:

score: 100
Accepted
time: 3ms
memory: 4356kb

input:

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

output:

2
2
3
3
1
0
1

result:

ok 7 lines

Test #2:

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

input:

5
-343262 -425835
-404933 -263958
-385199 -84549
-230327 -391761
-231870 -409273
5
-398669 -277320 1
-295974 -326155 1
-382029 -145287 1
-382457 -263288 1
-321567 -368811 1
5
2 1 2 3 4 5
1 5
1 4
2 1 2 3 4 5
2 1 2 3 4 5

output:

0
0
0

result:

ok 3 lines

Test #3:

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

input:

5
301297 -225875
117529 -163146
223822 24663
406031 11306
441899 -139192
20
215591 -64765 1
230906 -73077 1
161277 -101923 1
359144 -68061 1
387037 -28743 1
157367 -121943 1
339471 2107 1
151703 -170599 1
319501 -63818 1
392299 -3598 1
261130 -121253 1
329017 -158688 1
382711 -18689 1
174569 -69241 ...

output:

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

result:

ok 14 lines

Test #4:

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

input:

6
857 293134
-39250 428325
464499 488144
422697 397313
304207 312819
158004 295995
20
108517 364765 1
284919 428725 1
362044 401261 1
63569 317295 1
81662 360617 1
154010 296902 1
402302 460134 1
227234 339911 1
135951 301895 1
127639 318132 1
188445 331143 1
92250 335748 1
196299 433980 1
410680 44...

output:

1
1
1
1
1
0
2
2
1
2
1
2
2
2
1
0
0
1
0
1

result:

ok 20 lines

Test #5:

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

input:

7
-331692 -313556
-437948 -232137
-457192 -140943
-380331 -86148
-298905 -34641
-162812 4864
-81416 -108085
30
-236347 -87431 1
-167890 -154459 1
-333751 -194953 1
-241136 -203081 1
-373587 -274815 1
-336304 -99615 1
-395888 -131148 1
-363230 -78274 1
-299509 -242786 1
-373622 -225721 1
-343470 -169...

output:

1
4
6
2
5
1
2
5
4
2
6
3
0
1
2
4
0
3
2
5
2
4
4
3
2

result:

ok 25 lines

Test #6:

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

input:

7
-262123 -185578
-260801 -97687
-259030 -65549
-194138 26800
-78653 166898
24653 228607
-139426 -154968
40
-234554 -175509 1
-249308 -100172 1
-137032 -132261 1
-165509 3942 1
-143727 -1389 1
-146637 29352 1
-48533 158627 1
-152323 -103010 1
-242001 -55771 1
-127170 -98423 1
-167292 11641 1
-121061...

output:

4
2
3
1
3
4
1
4
4
3
2
1
4
4
1
5
4
1
3
1
1
2
1
1
2
4
4
0
4
1
2
0
0
1
4
2
2
1
2
2
0
2
1
2
2
2
4
1
1
1
1
4
2
1
3
1
2
4
2
2
1
5
3
3
4
3
3

result:

ok 67 lines

Test #7:

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

input:

7
11508 -53271
-112043 -19299
-73465 96801
29889 154349
156384 201020
212896 69542
106159 -1103
40
141189 48986 1
132781 79449 1
36178 142139 1
27757 67572 1
111050 178413 1
45926 89274 1
-51200 40830 1
78968 120440 1
57812 -21403 1
107907 44643 1
-92134 15540 1
53497 -18218 1
-91016 29401 1
3839 64...

output:

9
7
4
1
3
2
6
6
4
3
4
11
2
2
3
3
2
1
3
7
3
3
2
2
6
9
3
0
4
3
3
8
0
5
2
2
5
4
3
7
4
3
2
4
2
3
6
3
4
1
2
3
2
4
1
2
5
2
5
2
3
3
3
3
5
2
2
0
2
1
2
1
0
1
0
5
3
0
2
4
3
4
0
0
2
1
3
0
2
0
1
0
5
3
3
0
1
0
2
1
0
3
2
0
2
0
0
2
4
0
2
3
0
2
2
3
3
3
1
0
4
0
1
0
3
0
0
0
0
3
0
2
4
3
3
1
0
4
3
4
2
3
4
3
1
4
0
3
0
4...

result:

ok 747 lines

Test #8:

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

input:

10
192944 -236470
94158 -198452
90475 -122431
114083 -30990
150145 64378
190319 157773
205861 178361
288200 136929
322398 -168637
258464 -232916
1
296336 -108974 1
1
1 1

output:


result:

ok 0 lines

Test #9:

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

input:

7
318101 -354414
196368 -294116
202184 -207164
207590 -152677
299863 -179983
437537 -285733
352195 -339230
1000
360103 -261575 1
206265 -183486 1
247538 -178116 1
268415 -215514 1
258162 -238178 1
273914 -243658 1
207320 -227568 1
256184 -184942 1
238090 -257940 1
288655 -193703 1
276446 -183910 1
3...

output:

74
83
67
45
108
82
82
61
74
49
60
55
82
82
61
83
45
55
58
82
45
57
55
83
71
55
83
59
112
57
71
61
71
45
57
106
59
45
55
59
55
105
121
48
49
67
43
117
72
49
82
48
82
46
57
82
73
59
109
48
46
115
82
47
66
103
69
109
45
56
81
114
53
56
71
118
71
66
71
71
66
47
45
59
117
56
113
113
44
44
47
55
81
47
112...

result:

ok 757 lines

Test #10:

score: 0
Accepted
time: 61ms
memory: 4400kb

input:

7
209023 60678
146109 156173
104936 254633
126867 391820
268639 452930
298657 397685
290666 64172
50000
184244 139703 1
287882 193970 1
253749 66169 1
133864 277470 1
262835 355383 1
172342 345845 1
206247 113183 1
260717 74029 1
213059 326872 1
146332 201152 1
254375 355359 1
214065 111488 1
230388...

output:

4149
4149
3407
4216
4216
2074
1642
3699
5220
1642
3884
2110
3613
2074
5220
3406
2110
5220
3550
2109
3839
3823
3609
1641
4149
3990
5177
3550
5220
4149
3196
3550
2073
3990
5220
3839
5177
3884
3829
4216
3884
1641
3884
3609
3550
5220
2109
3990
4047
3406
3550
3990
3829
4047
3550
3990
3406
5220
4149
3550
...

result:

ok 37528 lines

Test #11:

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

input:

8
229448 25149
142337 63731
220515 407905
250646 460431
336241 411026
435557 322611
435495 237699
343036 142053
50000
383753 313257 1
241141 91355 1
224046 142318 1
391877 273157 1
229322 332186 1
290348 87829 1
286911 179476 1
369059 336681 1
178147 104769 1
246562 237943 1
309513 391182 1
290315 1...

output:

3377
3349
2798
3971
2798
1710
2251
2209
5445
2856
5806
1457
3971
1449
1536
2856
3704
4335
2343
3517
2819
3733
3504
3839
2046
3128
2639
3349
3241
2786
2792
2786
2046
2786
4620
2696
2369
2798
3971
2343
4548
4948
2722
1863
1740
4304
1535
1449
4548
1457
2696
4304
4856
2722
2786
3702
3971
3504
4948
3898
...

result:

ok 37446 lines

Test #12:

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

input:

9
11894 -300490
-95336 -236675
-96390 -161888
-70938 -111787
-44340 -110068
60529 -114355
85945 -124281
161925 -193467
230373 -256330
50000
192950 -240870 1
126657 -209760 1
49538 -209883 1
118348 -208555 1
73436 -120632 1
-86700 -223409 1
98480 -168129 1
112193 -196586 1
104088 -162219 1
-77864 -24...

output:

5150
1932
2392
2627
921
2174
299
1263
1250
1694
5987
921
4542
1457
1932
5150
298
4903
542
6337
1887
3528
1205
1250
674
893
649
1166
5155
6337
2248
228
3126
4708
2508
951
3290
3528
3673
2507
4901
1599
1371
1034
1931
893
823
3528
1249
299
1605
4779
1249
1991
2507
804
3349
542
921
2407
1991
674
1694
23...

result:

ok 37569 lines

Test #13:

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

input:

10
343518 -222781
271488 -140321
154410 40937
148379 107260
177228 96824
237161 73475
332875 -3443
386511 -68736
439887 -161678
436464 -199205
50000
266467 11041 1
391167 -111615 1
168864 34978 1
394745 -193711 1
421918 -136548 1
393872 -191055 1
351975 -217296 1
252919 -68047 1
257620 -8450 1
19910...

output:

2863
1392
3094
3053
2368
1175
1482
4080
4699
1747
2451
3181
1358
3387
288
2472
2368
4421
3912
1482
2508
3646
665
3487
4049
3389
2003
2654
3646
2333
3103
3090
1373
1045
1588
2389
2427
2613
2325
1906
3053
2332
2320
3357
2368
1292
3020
3500
1688
3311
3694
2746
2374
3722
5541
3722
3551
4682
2203
1481
17...

result:

ok 37622 lines

Test #14:

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

input:

12
45027 -450232
-22790 -367622
-94239 -135323
-14343 -108395
59896 -106345
139506 -109001
198842 -181828
237006 -235498
237570 -251143
232124 -305357
176632 -369059
94979 -443973
50000
-74072 -181149 1
80199 -121820 1
136494 -137857 1
190901 -257504 1
66854 -223048 1
130302 -367348 1
54126 -204027 ...

output:

2183
155
435
1146
5321
440
573
2016
1696
184
3942
2359
2774
2112
345
3829
4520
2446
1438
1554
1702
2886
3325
1685
3658
1216
3827
2466
2867
3360
703
3284
481
1676
2619
5994
908
2403
2749
2444
1359
267
1553
3253
2477
3178
334
2150
1914
1961
4037
2719
1334
1114
1367
1874
2190
1629
911
1239
2150
780
368...

result:

ok 37554 lines

Test #15:

score: 0
Accepted
time: 179ms
memory: 4856kb

input:

14
105512 40088
58853 56574
29883 67862
-98103 151386
-142776 184019
-123232 251472
-56040 291842
-3072 321621
64402 330197
89959 329427
145387 295516
166213 241510
168540 175992
154420 110133
50000
-41610 162875 1
-125090 180170 1
50831 121019 1
8546 97554 1
-22190 209710 1
-43578 210286 1
13070 12...

output:

1599
2786
697
707
3254
3273
1443
2341
2493
5297
2709
3159
3871
1117
2469
1817
2664
3332
2490
4245
2245
1337
2339
3696
209
528
2382
661
2047
2598
2180
3977
2033
3014
4081
3190
438
243
4024
236
3254
1743
1289
4853
1947
1232
3893
1058
525
2571
1659
1461
2765
4887
878
2541
4024
812
2995
529
4089
4904
22...

result:

ok 37273 lines

Test #16:

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

input:

16
-35085 -195174
-87113 -171476
-134109 -148639
-195185 -106142
-214727 -76401
-238104 -21963
-255341 39092
-264107 89372
-267522 135543
-232431 152005
-212802 160547
9820 -28418
24900 -77880
24546 -123887
8342 -161427
-13115 -191405
50000
-165296 -39299 1
-175944 -15383 1
-104595 -20755 1
-60382 -...

output:

1664
3625
3132
640
680
1700
617
3077
4417
2589
3298
2339
2849
2329
860
4392
3118
1135
197
836
1832
1056
1163
883
2199
2532
2372
1153
1872
538
394
2425
965
702
2413
2501
2504
196
2456
2277
2661
2383
1093
2124
1250
1143
1212
1196
422
1446
164
2527
1844
1633
3623
1569
2653
2001
4076
1150
2962
4119
1831...

result:

ok 37552 lines

Test #17:

score: 0
Accepted
time: 280ms
memory: 5484kb

input:

18
211802 231571
186460 235240
160714 248524
124426 276986
111024 304165
85369 357705
74755 381839
72427 391900
72657 429204
86269 477602
199653 492458
239904 495835
257168 475854
292508 424087
324832 373396
319056 319033
285281 267512
248889 231796
50000
176677 271773 1
232253 345647 0
167775 27683...

output:

3219
5174
1036
671
474
1025
1522
1468
1753
303
2180
2540
1749
1332
1521
2374
1166
178
252
1294
1658
1716
1008
4162
2509
1530
2854
2631
2020
925
228
243
1543
3786
2613
4974
3426
885
4094
1708
1352
659
1662
3417
1576
2324
319
2110
488
1484
2704
1692
700
1159
2056
567
3720
1750
2437
5077
2797
736
2042
...

result:

ok 37410 lines

Test #18:

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

input:

20
72069 122457
43302 143711
1012 181611
-30490 219029
-48191 240766
-78985 289677
-96324 335708
-76289 384216
-59476 418775
-39257 443638
5012 477333
18877 485265
63088 470816
106227 431762
137957 391542
175744 342781
166002 279393
143904 229926
132292 204154
108434 163131
50000
163866 303566 1
120...

output:

1258
3704
1339
1552
870
1481
1691
623
537
4653
1216
4368
1700
2367
3210
1627
1137
1773
4164
1460
3169
1562
2947
2640
1806
181
972
2078
2881
2262
1008
1476
2927
3172
2688
1854
1978
2194
3056
1571
974
1164
1782
513
96
816
1475
1036
623
1049
230
3073
2549
3510
628
1971
2886
1583
4565
3044
1120
5099
101...

result:

ok 37667 lines

Test #19:

score: 0
Accepted
time: 410ms
memory: 6080kb

input:

22
-22360 46730
-56455 51991
-74658 58128
-107786 80240
-149615 109961
-153078 115468
-161931 137786
-176730 177100
-148953 214164
-119579 247015
-101964 261029
-82211 275608
-48305 281683
-22699 282640
-15879 281429
136150 201594
143450 188504
139011 169831
125318 129771
80335 89473
35737 63705
-43...

output:

1714
443
1046
2721
1364
1857
877
309
1988
3670
2386
1161
663
1591
2330
459
1531
1373
297
1949
1305
438
782
5166
1177
2002
42
3184
1360
2792
1913
1944
1313
1131
4974
3235
3591
722
1777
1165
352
2152
3003
109
908
4578
2349
2459
3157
1966
211
4799
1046
2886
397
1724
2353
1533
5491
2190
636
4446
2382
38...

result:

ok 37551 lines

Test #20:

score: 0
Accepted
time: 487ms
memory: 6300kb

input:

24
-137299 -1469
-175974 -677
-198535 13011
-238874 42887
-263111 72989
-276169 104950
-282287 134220
-282447 168924
-250237 206752
-213005 244072
-189754 250717
-158472 253457
-150131 253181
-109850 249693
-80441 244208
-62982 235602
-44078 224119
-14386 205745
5841 189309
15210 156437
13461 125057...

output:

316
1845
1340
2769
608
590
5283
3748
345
2628
2011
1304
4066
3642
3598
1014
3511
1003
841
2970
1022
3771
2542
1412
114
1330
1996
2848
562
3245
1218
2072
1823
3108
4352
949
291
2139
266
4717
1003
2103
908
1186
2077
532
927
1121
2005
183
1284
3602
3372
2009
2701
1455
638
377
546
3051
1884
3779
59
3580...

result:

ok 37509 lines

Test #21:

score: 0
Accepted
time: 600ms
memory: 6640kb

input:

26
-291229 -73211
-317970 -51103
-343252 -23799
-355401 -2726
-366260 18480
-331097 225682
-325038 259554
-320592 280279
-302349 292407
-265399 310170
-235528 318598
-210884 307909
-191095 296592
-154766 265898
-125176 231397
-107175 195097
-94299 160939
-102454 137490
-111289 114700
-128909 86414
-...

output:

2382
1415
2933
2498
813
1176
871
4252
1205
725
1388
2846
2553
496
3150
1172
4050
883
1888
1373
1270
331
2678
2209
2626
1596
1490
1005
3074
144
2374
2315
781
4253
559
924
1116
569
640
1414
2047
1997
1697
1605
1434
1932
1448
2227
4090
713
1938
513
1464
902
3250
315
4387
1033
1065
996
2103
193
3198
150...

result:

ok 37168 lines

Test #22:

score: 0
Accepted
time: 718ms
memory: 7208kb

input:

28
-146599 -119406
-179946 -118015
-211693 -109124
-228970 -103149
-241182 -94939
-259076 -81398
-260514 -79492
-280448 -46924
-288608 -21164
-291034 11238
-292007 45497
-283334 78524
-221477 174782
-200448 198693
-179391 189892
-152270 177968
-120593 148138
-113275 139815
-85089 106254
-57176 71660...

output:

1418
842
4063
1986
853
421
325
2356
459
518
1323
1478
1284
1927
1131
1350
1941
2421
410
4877
2850
869
2627
2735
1449
1339
989
849
1203
1326
614
1198
1585
907
784
1900
1204
2195
2163
1455
697
2389
607
2141
4385
1919
1458
1113
564
1312
818
1248
2279
2781
436
1066
1343
216
1660
951
3896
1446
3553
529
3...

result:

ok 37153 lines

Test #23:

score: 0
Accepted
time: 894ms
memory: 7620kb

input:

30
-277052 201468
-287962 203323
-312816 217289
-315829 219379
-347093 250301
-352873 269188
-355791 286255
-354879 312717
-353080 339531
-345209 355856
-329254 383225
-310387 414586
-280845 443079
-266722 454790
-248041 469873
-220387 480285
-187968 490593
-161985 489073
-132875 486310
-104293 4689...

output:

550
846
478
2312
732
2433
613
2859
2276
854
2156
360
829
4316
2987
1640
2287
138
234
173
3373
1370
3338
2739
608
1603
617
3111
2947
2315
1950
3877
679
1957
1386
3984
1213
2125
543
691
3324
2149
442
2175
4701
3801
746
1419
1690
2216
391
1011
1691
1422
494
2521
929
1141
1117
1870
2445
954
2153
1201
19...

result:

ok 37395 lines

Test #24:

score: 0
Accepted
time: 864ms
memory: 7548kb

input:

30
271799 -8427
257323 -6726
228937 1664
208796 8543
185003 20234
155738 41190
139139 61836
131177 89258
130369 94398
128006 122561
133574 129925
160677 149667
176311 160468
411081 311782
420658 314973
447826 298235
460545 286830
480084 259374
495838 236331
497023 207575
494448 183882
480746 157987
...

output:

303
2238
1166
1871
2449
3612
1391
3362
1345
583
4369
1174
178
644
470
581
1206
2768
4261
1430
344
1344
46
1454
1280
3484
351
380
166
1616
3612
2592
3330
1400
807
1247
558
78
427
200
13
665
2100
1466
2252
251
895
747
2978
155
3942
972
1806
530
473
1507
512
869
1860
2179
141
3332
791
649
4447
2131
383...

result:

ok 37403 lines

Test #25:

score: 0
Accepted
time: 913ms
memory: 7628kb

input:

30
124785 -188707
102803 -186368
88208 -183526
66403 -177743
-22571 -154074
-38158 -141617
-70204 -111703
-87026 -81820
-90856 -67846
-86812 -40830
-75382 -12286
-61521 7931
-49151 19237
-28754 35337
-20150 41501
5699 57074
22672 59424
38824 55045
63685 46711
81106 40317
107016 23579
137828 1447
168...

output:

864
2202
1087
1163
1207
53
1249
2332
1041
1693
3309
383
1883
506
3736
357
4127
1494
2014
671
3534
2402
3502
2166
98
4008
2124
1801
2361
652
213
377
427
1012
2445
2205
1280
3222
3102
807
605
1095
1672
385
44
2495
629
180
1509
272
4149
1571
3808
1959
2157
4891
1615
2615
831
1356
4029
1498
1360
2917
21...

result:

ok 37395 lines

Test #26:

score: 0
Accepted
time: 859ms
memory: 7616kb

input:

30
-10639 -397754
-27832 -397176
-57737 -391622
-74350 -386373
-86365 -378380
-98701 -369881
-105690 -362587
-106075 -362150
-111292 -354315
-115404 -326010
-108208 -122659
-89011 -99201
-70367 -76798
-56119 -67602
-43080 -70479
-13732 -89824
6796 -114295
24457 -144207
32848 -164353
45275 -195206
52...

output:

2721
2329
454
673
1703
1366
766
3796
517
1423
494
1478
492
608
2990
476
2018
1813
962
1863
3037
1198
2919
1734
179
365
200
904
880
1694
4390
1776
1164
3280
12
1160
930
2682
1184
2184
860
913
31
63
2301
3769
3158
2602
926
45
3894
2229
2091
209
1039
2160
4278
837
4463
600
3604
932
5156
727
307
3104
40...

result:

ok 37384 lines

Test #27:

score: 0
Accepted
time: 874ms
memory: 7652kb

input:

30
-17798 -420919
-48981 -408272
-143413 -368350
-155150 -358873
-164102 -342635
-175267 -311180
-174348 -292386
-170287 -263681
-163440 -231051
-157576 -214138
-139215 -197569
-113242 -177401
-96525 -165306
-91905 -162083
-90009 -160940
-60860 -147261
-28491 -149716
3619 -157761
16148 -161906
41550...

output:

794
2613
742
459
1230
1221
61
2048
2182
4486
1095
1946
591
1435
927
3826
3729
584
274
3453
1918
2598
104
1240
518
1366
1692
1897
1264
476
1252
702
503
3398
618
1650
1255
1530
1318
2429
817
2198
662
532
697
3947
2800
3315
541
647
848
729
415
2085
117
58
2345
498
2731
2117
351
594
942
2847
352
2678
10...

result:

ok 37394 lines

Test #28:

score: 0
Accepted
time: 859ms
memory: 7628kb

input:

30
15415 -132769
-9470 -129839
-20058 -128066
-28507 -126185
-43996 -121519
-63867 -114411
-93045 -102982
-112898 -83214
-135647 -49971
-146823 -20762
-149542 -12845
-159862 18764
-153905 50762
-141145 82912
-132951 99529
-110022 123046
-84318 133291
-66253 128321
-35495 112642
-6480 95150
14460 790...

output:

2667
1104
2358
2284
934
3493
1476
4305
552
3430
377
467
287
608
321
4042
2246
2404
736
991
1230
2069
1659
2613
2931
692
1599
762
603
2692
4403
1130
114
2355
2444
1903
331
1716
520
1270
1813
18
1504
1985
2021
1313
1805
393
2410
447
249
581
489
498
1853
2675
124
4345
682
1829
723
1703
1442
3640
950
92...

result:

ok 37414 lines

Test #29:

score: 0
Accepted
time: 1305ms
memory: 7476kb

input:

30
136338 -96862
123278 -96496
98779 -74824
78570 -43574
68426 -11745
121487 212652
133941 235709
149116 243733
156126 247039
187996 257038
199137 259652
214833 255496
248141 239831
260751 231896
293633 210696
326568 185192
351697 160552
378494 132783
380413 110869
377540 88875
369846 69028
361763 5...

output:


result:

ok 0 lines

Test #30:

score: 0
Accepted
time: 1061ms
memory: 7488kb

input:

30
139096 -232985
115817 -227081
89657 -216936
58008 -198568
28537 -177970
26203 -169194
36793 -139715
53035 -110359
68051 -85715
71300 -81856
101797 -49406
111955 -38614
128429 -25007
151712 -8215
161380 -2816
183771 7058
201373 2339
214881 -7705
245563 -37531
255535 -50427
265980 -65213
282122 -95...

output:

2520
2032
3421
231
3043
2430
1796
1356
349
1580
676
1376
978
3586
1348
692
1690
889
138
1896
2864
1300
1253
57
4063
3705
174
1400
352
3148
3983
1720
1282
2629
1026
2349
1721
284
530
2358
510
770
1340
618
1843
1126
1131
90
1120
2214
1496
708
1248
505
550
1005
1662
5208
1217
1813
1983
2526
3535
362
26...

result:

ok 24977 lines

Test #31:

score: 0
Accepted
time: 928ms
memory: 7496kb

input:

30
-236728 -437931
-262174 -435792
-335412 -382991
-361396 -357928
-375922 -333345
-375561 -325389
-355511 -300083
-328111 -275392
-300445 -253278
-281814 -239018
-264056 -229422
-250310 -222806
-230058 -216661
-212827 -214128
-195717 -214739
-171384 -216688
-169954 -216913
-163427 -218635
-131540 -...

output:

3184
274
1287
693
2573
311
4448
1906
337
927
441
333
711
337
426
551
2968
2679
190
3072
136
2463
314
2102
1485
2090
2730
466
2143
342
243
1954
1410
3192
91
2808
48
1222
1731
822
389
450
2611
2612
2887
2162
770
2002
2170
1692
1981
1542
2287
727
4
2242
592
1830
1163
347
565
84
1050
1203
476
1605
4625
...

result:

ok 33432 lines

Test #32:

score: 0
Accepted
time: 929ms
memory: 7612kb

input:

30
-72008 280352
-84751 282753
-117226 293982
-128009 297997
-138986 304635
-157943 327250
-173334 356777
-179763 377373
-184226 398104
-180949 412083
-171906 435798
-153557 455518
-127766 469290
-111873 476961
-83126 486371
-56501 493646
-23972 496932
-8522 495853
11782 489717
40164 479537
71107 44...

output:

1355
2125
1506
2338
368
99
1345
944
1751
836
1711
1585
897
455
1655
2365
1757
802
849
551
1366
860
532
1254
5208
2862
1360
3353
1357
732
670
3525
3304
2101
2197
2309
3059
1657
1799
907
3829
2611
1537
1791
1933
1186
982
1764
985
451
3655
1929
551
4012
533
2311
3631
427
2044
342
407
591
1857
1536
1693...

result:

ok 37386 lines

Test #33:

score: 0
Accepted
time: 864ms
memory: 7640kb

input:

30
192888 -310978
184693 -309315
152433 -281311
135989 -255504
126091 -227576
117891 -195547
114198 -180678
111832 -149707
126990 -122151
135788 -109830
151291 -88702
272254 19188
301187 27165
326859 19214
338839 5649
355712 -16188
369396 -37958
377085 -70635
376792 -84714
374671 -112556
367403 -135...

output:

1610
1038
213
558
2268
669
1605
2932
499
611
292
3259
1826
1676
1471
1618
2271
800
4203
587
2739
2322
154
1328
1858
2543
3085
958
1335
1095
1918
2784
1199
2757
622
2267
2393
1826
781
1533
2599
2668
270
110
748
661
1047
400
817
1283
1301
1305
385
374
872
381
1322
1322
122
497
1951
709
1996
505
1487
1...

result:

ok 40071 lines

Test #34:

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

input:

30
-155426 72480
-187019 85757
-202232 99214
-220705 121485
-223301 132091
-228310 154632
-225129 186260
-220923 214709
-215855 244068
-210359 268798
-196279 301929
-182113 317161
-174949 324522
-154050 340544
-122888 358457
-92205 373779
-67353 374069
-36583 371174
-14698 366257
18455 342680
49903 ...

output:

1500
933
2025
498
1829
1326
901
4968
897
204
1219
952
389
3848
2724
815
1389
1736
1979
2154
1915
3413
1829
2078
866
1800
391
399
3007
3686
689
1547
1139
3196
3600
868
458
2254
1042
2117
1347
526
424
181
1670
901
521
1123
2352
15
1358
2320
3998
683
10
1582
2716
1329
4709
877
1866
3052
1293
263
978
14...

result:

ok 41706 lines

Test #35:

score: 0
Accepted
time: 806ms
memory: 7496kb

input:

30
321712 -287232
293986 -286214
268553 -276880
239944 -263864
218299 -246732
195041 -217654
207391 -186946
224063 -155521
285733 -47744
305268 -16772
324210 12729
343385 11031
373285 8217
396855 1096
428742 -19042
442638 -30354
464678 -54675
469055 -61348
481513 -86528
481321 -93091
479113 -122466
...

output:

2553
488
1215
63
595
1331
2589
480
2928
303
2616
52
1431
176
410
2389
310
1138
3810
1634
1094
577
2078
1889
2594
1619
1903
3507
1617
3595
2266
2908
420
1485
2284
3888
1041
1625
429
122
2604
968
2961
2165
3224
177
1446
1209
218
3244
101
49
519
3188
3157
2055
3038
172
1423
2153
3857
3540
2423
562
205
...

result:

ok 42917 lines

Test #36:

score: 0
Accepted
time: 737ms
memory: 7636kb

input:

30
-251354 57124
-260459 59022
-347898 86898
-370526 95652
-394579 111906
-414918 126376
-440833 155123
-450525 166937
-458965 178684
-450595 205413
-435985 221818
-435062 222528
-407344 241795
-398500 246128
-367468 260926
-342511 266220
-310609 269012
-301419 268924
-268672 256896
-253439 247553
-...

output:

2218
1422
310
711
2178
5138
412
2948
836
3259
3006
2038
1834
398
380
647
1540
634
1579
553
1874
1267
1461
835
958
1081
110
1047
531
967
3743
2536
429
2718
982
166
2299
1033
382
2062
437
1548
192
881
1689
893
1876
1553
3112
1704
1739
2931
2352
110
246
2393
661
3486
2656
3706
301
59
1803
3367
2143
277...

result:

ok 49490 lines

Test #37:

score: 0
Accepted
time: 693ms
memory: 7644kb

input:

30
228571 166611
197254 184103
3020 295881
-13342 314790
-21220 330850
-32134 363527
-34428 381772
-32844 401537
-25212 420356
-15562 437757
-7929 450073
8180 465335
19944 475242
50355 478728
80131 459664
106425 440575
111824 435731
139314 410474
161798 387704
187081 360924
205322 341060
235511 3080...

output:

2515
1724
503
364
2267
58
1869
1487
256
45
1382
1575
202
1158
2167
4098
2975
1642
21
2045
1529
1030
666
3930
576
1059
2994
1825
789
572
4978
1954
3320
298
295
1972
900
699
880
462
281
3033
1785
723
1569
105
1898
446
1337
2605
661
2529
176
1192
615
352
1360
472
3150
1644
857
2581
1348
2256
1245
1726
...

result:

ok 49951 lines

Test #38:

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

input:

30
-292329 -278760
-315960 -273429
-347250 -249735
-373442 -229415
-381657 -216598
-394218 -195139
-405625 -171520
-414047 -140240
-415114 -119408
-411201 -96188
-402521 -65685
-390801 -39173
-374907 -11474
-349555 10461
-326101 19130
-311307 13793
-286021 1714
-263351 -16014
-257933 -21124
-245968 ...

output:

3263
3163
1977
97
962
4966
1155
1383
26
1723
1446
2251
2966
1635
1568
679
469
716
3008
2411
1809
440
1837
583
954
3705
2399
120
1579
1059
381
197
698
1516
2381
4624
2220
600
1771
937
1241
1215
580
4260
613
1931
4495
25
1849
1981
422
4026
2423
3034
4239
2248
953
2876
2611
2419
1112
1683
3564
4024
111...

result:

ok 50000 lines