QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#744162#4345. hpmo / 赫露艾斯塔TheZone100 ✓469ms13980kbC++201.6kb2024-11-13 21:02:232024-11-13 21:02:24

Judging History

你现在查看的是最新测评结果

  • [2024-11-13 21:02:24]
  • 评测
  • 测评结果:100
  • 用时:469ms
  • 内存:13980kb
  • [2024-11-13 21:02:23]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

using ll = long long;

const int N = 1e5;
const int M = 2e5;
const int B = 250;

int n, m;
int x[N + 5], y[N + 5];
int a[M + 5], b[M + 5], c[M + 5];
double dist(int i, int j) { return fabs((ll)a[j] * x[i] + (ll)b[j] * y[i] + c[j]) / sqrt((ll)a[j] * a[j] + (ll)b[j] * b[j]); }

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

bool vis[N + 5];
vector<int> key;
vector<pair<double, int>> line[N + 5];

int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) scanf("%d%d", x + i, y + i);
  for (int i = 1; i <= m; ++i) scanf("%d%d%d", a + i, b + i, c + i);
  for (int i = 1; i <= min(B, n); ++i) {
    int j;
    do j = uniform_int_distribution<int>(1, n)(rng); while (vis[j]);
    vis[j] = 1, key.push_back(j);
  }
  for (int i = 1; i <= m; ++i) {
    int res = 0;
    for (int j : key)
      if (!res || dist(j, i) < dist(res, i)) res = j;
    line[res].emplace_back(atan2(-a[i], b[i]), i);
  }
  for (int i : key) {
    sort(line[i].begin(), line[i].end());
    for (auto [_, j] : line[i]) printf("%d\n", j);
  }
}
/*#include <bits/stdc++.h>

using namespace std;

using ll = long long;

const int N = 1e5;
const int M = 2e5;
const int B = 250;

int n, m;
int x[N + 5], y[N + 5];
int a[M + 5], b[M + 5], c[M + 5];
double dist(int i, int j) { return fabs((ll)a[j] * x[i] + (ll)b[j] * y[i] + c[j]) / sqrt((ll)a[j] * a[j] + (ll)b[j] * b[j]); }

  for (int i : key) {
    sort(line[i].begin(), line[i].end());
    for (auto [_, j] : line[i]) printf("%d\n", j);
  }
}*/

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 20
Accepted

Test #1:

score: 20
Accepted
time: 19ms
memory: 8828kb

input:

9997 9990
9019266 5863617
-9132512 9933564
-3874637 4993765
444830 -2250447
-2352800 3441144
-6132076 -4919200
-1607690 1649753
-3707230 -9677822
-4044043 949637
-7761530 2069488
9475384 4537713
-6619947 -121926
5929373 653750
5738540 -7373755
1630427 2169595
7049000 185616
-4436632 7644104
-7326158...

output:

5243
8394
7694
3428
2039
4623
2957
6242
145
3962
8898
2408
7764
8357
4281
4974
9608
2704
8388
3894
3074
1010
1150
2747
1438
8634
4494
6166
3021
4799
2052
512
2563
7178
9252
1129
6040
8505
175
1384
3158
4504
2610
3114
1729
8353
2617
6772
1403
6848
7362
8129
2279
1476
1402
744
999
4908
5618
2341
3686
...

result:

ok AC

Test #2:

score: 20
Accepted
time: 23ms
memory: 8828kb

input:

10000 10000
-9867885 -6351277
3489722 8586294
-813430 9340951
2086219 9210082
8903276 -6786767
8717742 1297662
8333166 -3317203
7936341 4929952
4912513 9933563
-4537308 -9543067
7319834 8626975
-5937113 -4470138
3427489 -6194898
-7290157 -3404718
-3724079 2294733
7598186 6969998
-9934248 6924016
428...

output:

189
9217
9316
9558
9978
5602
792
6621
5926
5570
8271
9746
8605
1228
7370
4077
6548
7114
7499
6350
9564
3278
214
6004
6421
8786
7301
6175
2653
2634
3941
4569
9638
5699
2556
6925
95
5113
4760
4519
5844
7223
5779
7841
6657
2900
6334
2054
6927
6512
348
5311
6520
9508
4106
1969
1480
8945
8973
6623
5304
8...

result:

ok AC

Test #3:

score: 20
Accepted
time: 19ms
memory: 8832kb

input:

10000 10000
-660951 65490
-29833 2757177
-340846 10961
-7150119 33459
5136755 4278
25550 775750
5201020 -5199
75169 4666130
67597 1714309
-36541 -3114964
-4240048 31425
73017 2383801
-94770 -836461
7728250 65154
-62043 -9108010
49090 4597522
-6217034 -71671
-6369695 31577
31865 8971451
72473 9040891...

output:

1118
4228
6872
7480
1906
8966
9961
8516
6491
3058
4863
5445
114
9923
5795
9160
4652
7380
6492
6378
1322
7507
2256
1850
6884
1315
3473
1445
6340
7410
5154
9641
2396
5118
2798
1330
1675
1617
6354
550
2667
4139
2862
2615
8757
1289
9355
6362
2804
4244
9854
1815
6044
171
9805
5873
6059
7284
9551
320
8136...

result:

ok AC

Test #4:

score: 20
Accepted
time: 19ms
memory: 6772kb

input:

9998 9990
7582 3856200
9459 4381
-5500354 -8064
3998 -8251368
3506 6715096
-8509 -321964
1725 -1322233
5849831 -1846
-5027 1011243
2596 1990975
-9353 -1004281
3956 -604279
8402459 6848
5419 -2187141
8567983 -2494
1683 4015848
-7337 8293412
-7173 7399645
3799 8763972
4228499 -1835
-8493 -2845008
-833...

output:

1849
4754
4564
2680
9698
9014
2666
7607
9341
9572
4557
5509
1184
8610
8799
7762
4856
9863
8197
6687
4629
6230
4227
7952
1799
6672
710
8474
4599
2480
5589
3055
7872
4276
4579
6865
7728
2953
584
2271
4449
5804
958
7141
1766
1744
6605
5240
8830
7916
5369
1708
5334
7584
5943
7040
1212
5774
941
8660
3907...

result:

ok AC

Test #5:

score: 20
Accepted
time: 19ms
memory: 6956kb

input:

10000 10000
-9144786 9458431
9233721 -9868159
-9349753 -9965861
9814616 9358465
9750984 -9543095
-9665224 9051130
9964223 9790510
-9960351 9771782
9534798 9181687
-9569872 -9172559
9221230 -9786591
9879500 9613336
9830155 9270397
-9866671 -9417021
9337577 9481408
9668674 -9921731
-9817467 9225012
99...

output:

4651
38
6189
4191
7507
2732
8745
480
1401
5275
4152
5033
3436
9448
321
6170
6828
2092
2513
4329
4780
7460
3606
6709
8616
15
40
111
140
149
285
319
389
430
444
503
537
539
602
606
708
730
802
861
927
937
940
1131
1169
1224
1247
1279
1322
1432
1485
1529
1536
1599
1662
1664
1678
1685
1715
1720
1724
174...

result:

ok AC

Test #6:

score: 20
Accepted
time: 23ms
memory: 8836kb

input:

9990 9990
-967949 32827
-1626409 25231
3914913 -17371
-3340636 -33022
-5664776 7967173
-5125 -27879
4988706 -3540854
-9980324 -14749
2914084 -16185
-3231561 9522
1044674 19300
-3619589 16689
1056583 4919512
-141677 -29040
-2587777 -8824
8185554 -10101
-3482427 -1834
8972857 -3639730
-7063435 -8995
2...

output:

5745
1397
7347
6746
2279
2538
3545
6949
799
349
5665
1419
4974
3008
9685
7718
7056
9422
2667
5270
7580
6379
8394
4345
7323
895
2917
3937
2172
5019
9498
3254
8810
9584
4450
6436
3773
1697
6437
9770
1662
8843
9134
6124
7574
5321
5240
7457
2133
3409
548
9210
5531
5889
6796
1944
6580
2789
5988
4374
2231...

result:

ok AC

Test #7:

score: 20
Accepted
time: 23ms
memory: 8788kb

input:

10000 10000
1968477 4944613
6286972 -9851737
-6437502 -4770833
1151523 -7901737
-3149643 9687929
-2205837 -376397
-1324393 5174345
3034439 6480824
-9341786 -7611299
8694184 -3435575
95532 -7378553
-428305 -2628108
263 -5693153
4995174 -4874425
-5093158 -5437311
5434124 6700984
-984539 2903531
293896...

output:

8257
1687
1509
5710
8945
4077
6876
6607
8147
8226
625
735
2821
4259
7110
7222
8211
1742
8389
8032
5540
2872
522
3157
3805
4564
3380
6666
5690
1902
7563
8626
6820
7615
3544
6248
394
2104
7149
953
5378
2153
2293
2388
2702
3361
5239
6012
6860
7835
8885
9508
1432
147
648
3253
1229
2199
2918
5935
8714
41...

result:

ok AC

Test #8:

score: 20
Accepted
time: 23ms
memory: 8916kb

input:

10000 10000
-1326300 -7573500
7443150 -8520425
9706112 5114022
-2518500 -7674600
5016700 630200
9734400 8710400
3048966 -5268394
610442 -1407578
7055300 -101500
616523 3597946
-3141466 6983439
5742991 8144648
5661864 4435109
-2226200 -4249300
-5924600 -9402400
6799900 -3953000
6648000 -8833700
80689...

output:

1333
4798
2432
4309
6308
7178
1276
7137
5896
241
2017
7644
4533
4610
7267
4614
6284
7111
1211
3436
2627
9498
5800
8825
2812
119
1264
7283
6674
6953
1606
8997
4551
1929
259
262
1214
8985
6668
9820
9853
572
5851
4117
4035
2458
1130
2112
1981
2698
4160
8256
3244
1700
2046
3535
8713
1096
4502
7714
2093
...

result:

ok AC

Test #9:

score: 20
Accepted
time: 23ms
memory: 6896kb

input:

10000 10000
-2318095 2019446
-4035918 2985975
713901 -223858
3296173 -824906
-83732 1397407
-316288 128177
-1184337 -2715514
18449 -3918764
482679 -859441
2741883 -4078535
-5781803 1089808
-2596705 -3341805
-3283602 4287650
-204221 2840836
-1521345 -11681
5377933 4075120
-862909 -1012305
-616438 -64...

output:

7899
5730
8798
7870
3468
3155
5571
2925
9953
4245
1388
871
1679
5606
2306
1167
9588
7462
4697
7495
1426
1309
2699
3061
6847
9632
5263
5792
5942
8140
940
8791
5564
6433
4829
1203
8409
8589
3573
2077
180
8462
2475
1660
5215
6203
2223
326
8835
9566
6109
7622
5302
7553
6174
2910
5213
8346
7235
4414
5601...

result:

ok AC

Test #10:

score: 20
Accepted
time: 19ms
memory: 8844kb

input:

10000 10000
30399 911905
6099694 -822955
-1970492 1924582
8133655 -2339409
1225483 -1771551
-578009 -1208298
-5626070 5251285
-3033849 -8699056
5626898 3642052
-2037392 -1207307
-6932083 -3926601
7017312 -2624958
-4505258 -3199363
3196125 4153290
5919593 3128640
-5235780 -3147933
-4493757 162244
573...

output:

1183
9606
625
2348
4330
4533
2541
5589
3739
5466
1805
7804
9039
4477
7800
4265
21
143
1175
2724
7751
742
2824
7978
793
7306
8761
6875
6903
1072
3088
823
7980
8431
9649
3365
8357
4350
132
9006
9891
5615
6532
3032
1757
785
5500
31
1297
6215
9611
3885
4189
330
8238
458
6861
5643
8103
4518
9418
5929
215...

result:

ok AC

Subtask #2:

score: 30
Accepted

Test #11:

score: 30
Accepted
time: 469ms
memory: 12840kb

input:

100000 200000
-8961334 8961334
-7613572 -7613572
-3090937 3090937
8569374 8569374
-526841 526841
2030109 2030109
829999 -829999
6793124 6793124
-5100765 5100765
-4111697 4111697
5995701 5995701
-3387024 -3387024
1395655 -1395655
1161722 -1161722
7911524 7911524
307563 -307563
1112474 1112474
-131073...

output:

32421
26830
11122
57880
193177
34705
50186
124161
175473
34191
148611
188952
24736
39135
133673
192190
11204
1660
38039
111755
121860
195145
101559
153938
97343
110638
160367
171276
187913
152575
157649
45405
100861
57944
15093
125955
19898
70787
120113
99215
137562
168596
148504
40427
91459
9164
40...

result:

ok AC

Test #12:

score: 30
Accepted
time: 456ms
memory: 13112kb

input:

99995 199993
-6901477 6901477
-1845889 1845889
934067 934067
4499968 4499968
-7373617 -7373617
9655283 9655283
9909636 9909636
3781678 3781678
8382976 -8382976
9572634 9572634
5961770 5961770
-6817835 -6817835
1707317 1707317
8703130 8703130
3783006 -3783006
-4869514 4869514
-5733646 5733646
-418580...

output:

71738
168618
197116
175646
199112
91654
111311
31813
43226
118900
36154
77213
151122
193898
35263
36160
65564
84519
142906
27284
174049
1424
10391
17219
27824
31928
43824
60642
99729
129779
159139
176140
177842
27978
182372
28800
12088
41101
55808
80059
151403
2631
37593
50274
84294
138127
90318
140...

result:

ok AC

Test #13:

score: 30
Accepted
time: 432ms
memory: 13228kb

input:

99992 199994
88614 88614
7096410 -7096410
3894885 -3894885
67776 -67776
-8727157 -8727157
-29896 29896
8541631 8541631
-15653 -15653
-2318947 2318947
1990132 1990132
-7126 -7126
-2096941 2096941
87950 87950
-40903 -40903
-19865 19865
9066395 9066395
-8750432 8750432
-14428 14428
8790520 8790520
-466...

output:

165633
151095
183941
83483
144672
133530
101697
145017
59449
170618
9508
121091
101864
143439
113502
32304
72903
77422
4172
164948
198299
83708
151703
40063
93126
62087
35735
9000
75038
117965
1635
53798
171554
6204
133695
42802
156345
122402
88890
86631
129149
150270
91577
188726
41393
93154
101909...

result:

ok AC

Test #14:

score: 30
Accepted
time: 455ms
memory: 13584kb

input:

100000 199990
-2262 2262
9855799 9855799
8873539 8873539
4744 -4744
-5302050 5302050
-5359476 5359476
-5002234 -5002234
-8027512 8027512
-6100 -6100
6259671 6259671
4922 4922
7251 7251
-4096997 -4096997
-693 693
-9210010 -9210010
-1651967 1651967
3644 3644
-5324 -5324
1949 -1949
7733 7733
-1155 1155...

output:

199006
183191
192728
72497
14545
114371
39055
97207
148223
89744
50429
10039
94859
110244
141007
20803
23953
179724
120651
89004
163154
51272
143740
121632
139036
101685
196502
46677
60895
39401
62643
132678
145917
65016
13634
65438
140947
54034
74706
36100
192311
34224
55018
149731
164679
126863
15...

result:

ok AC

Test #15:

score: 30
Accepted
time: 459ms
memory: 11888kb

input:

100000 200000
9046132 -9046132
-9036450 9036450
-9419376 -9419376
9775641 -9775641
-9561024 -9561024
9314457 -9314457
-9542725 -9542725
9441387 9441387
-9331034 -9331034
-9653540 9653540
-9914585 9914585
9434612 9434612
-9219316 9219316
9124798 9124798
9841837 9841837
-9145939 -9145939
9317396 93173...

output:

77109
180457
191307
80601
85654
48
226
804
1257
1594
2660
3458
3926
4480
4515
5271
5883
6336
6682
7415
8951
10256
11578
12266
13449
13967
15721
16330
17470
17685
18627
19351
20080
20460
22705
23194
23199
24097
24599
25980
26610
26978
30938
31949
32989
33143
33249
34231
35143
36225
36344
36662
37410
...

result:

ok AC

Test #16:

score: 30
Accepted
time: 444ms
memory: 12740kb

input:

99994 199994
4956621 4956621
-4358823 -4358823
1056343 1056343
-9986 -9986
-7565 7565
3063855 3063855
-15131 15131
-943318 -943318
20729 20729
4624729 -4624729
2636623 -2636623
-19923 19923
3883762 3883762
-7257661 7257661
8029 -8029
23678 23678
-20009 20009
-7424 7424
-5431 -5431
-32667 -32667
4562...

output:

198493
186939
157178
62708
111064
89878
135702
37416
37791
50775
78216
105788
147330
161843
196497
67133
87121
153286
183323
26586
83043
96716
178421
77855
30299
160584
160931
1592
29609
40547
57849
58831
81731
86500
133249
137872
148582
188336
18681
56761
168938
36001
60485
93149
102566
196859
5818...

result:

ok AC

Test #17:

score: 30
Accepted
time: 453ms
memory: 12220kb

input:

100000 200000
-4834102 -4834102
5022121 5022121
6712316 -6712316
501609 501609
-6567565 -6567565
2112388 2112388
135850 135850
9040818 9040818
-7430373 -7430373
-280592 280592
-7143119 7143119
8061435 -8061435
7982642 7982642
4434783 -4434783
6517450 6517450
-1450938 1450938
5380539 -5380539
-467314...

output:

16434
29495
22398
171301
9342
144891
26556
113417
126978
131521
30451
111869
148884
98432
110692
130034
175719
2981
63061
41423
94436
133828
193197
98434
112198
175103
31850
68507
23189
21283
193575
51220
74421
128615
158194
95352
10487
48000
108751
197135
51785
93200
186694
33705
42859
60975
141490...

result:

ok AC

Test #18:

score: 30
Accepted
time: 454ms
memory: 12768kb

input:

100000 200000
-4054600 4054600
-7279300 7279300
-7314500 7314500
-7425563 -7425563
9683145 -9683145
5107500 -5107500
8673600 -8673600
-5867000 5867000
-5227842 5227842
157100 -157100
-9963728 9963728
9768949 -9768949
-5435576 5435576
3784700 -3784700
4851500 -4851500
1340500 1340500
126129 -126129
-...

output:

117201
66019
50646
152670
15966
26544
175371
154566
101310
105362
136244
46722
124107
26534
192764
136390
78460
27917
77047
83368
86385
145218
185742
189171
39347
5768
28076
138671
2762
146983
37027
182772
92900
184495
35403
116784
33618
108092
154362
197374
127908
67084
79271
103163
137368
198309
1...

result:

ok AC

Test #19:

score: 30
Accepted
time: 459ms
memory: 13980kb

input:

100000 200000
862879 862879
1706435 1706435
3765244 3765244
-308612 -308612
-1794479 1794479
-2257534 2257534
-723517 723517
-3244580 3244580
887265 887265
-1954969 -1954969
1397202 -1397202
-318905 -318905
-4927517 -4927517
-1328060 -1328060
3126144 3126144
-2144656 2144656
1433235 1433235
3902973 ...

output:

150312
70557
110721
182026
166776
179697
180877
28316
191791
108918
5093
109530
183287
178937
29496
30567
153295
78194
156590
86646
66694
185587
191481
147841
165135
53939
80314
148320
19549
124355
154117
90814
62553
123035
7137
53825
190918
57348
5470
176416
85061
58880
62701
8572
154449
54308
3324...

result:

ok AC

Test #20:

score: 30
Accepted
time: 433ms
memory: 13120kb

input:

100000 200000
3759321 -3759321
3655283 3655283
-3682409 3682409
5518887 -5518887
127820 -127820
357474 357474
-2169485 -2169485
-6574572 6574572
-6166766 6166766
-2287638 -2287638
6842868 -6842868
6145121 -6145121
1834545 -1834545
-4493202 -4493202
-2423151 2423151
-5017153 -5017153
-1814368 -181436...

output:

73555
127497
14116
83861
15205
188300
2260
139505
142557
176208
136344
67934
82179
129708
133353
151024
73146
132888
184676
70678
41124
166363
43179
39233
122980
78319
171335
30218
128682
77750
97040
147773
43095
187684
153920
88758
97160
188153
156798
183575
64873
70523
116716
43643
156366
99421
78...

result:

ok AC

Subtask #3:

score: 50
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Test #21:

score: 50
Accepted
time: 453ms
memory: 12744kb

input:

99995 199999
5320759 3219017
-7891980 -7312757
2180279 9474165
5031926 -4436871
-7629930 762411
-9918337 2445040
7782870 -3248418
5660195 -6031840
-3452958 -2244908
9268868 -3566739
8119257 -3126185
6361275 -4963409
1043913 -6959661
7088913 -5089638
-9265623 -9227310
2423735 8343518
-4698952 8406424...

output:

161488
174506
150567
179455
61922
16402
199311
160384
178515
189506
21842
177680
14170
38416
176606
112713
88624
58801
27397
134629
111114
153314
157543
58843
129912
67794
155444
108194
12237
18523
31903
62058
67636
13111
199791
47545
148457
182697
3428
79809
93958
172116
68136
80336
34507
51501
841...

result:

ok AC

Test #22:

score: 50
Accepted
time: 454ms
memory: 12660kb

input:

100000 200000
4274032 -8564615
1752457 -7056073
-7978532 8824025
-3167506 -5248972
5711527 9730398
7728051 3966415
4544367 -5526016
-5239209 -6317728
-4686212 -6910566
-9122095 -5994275
9784510 6801112
-7343677 -82634
2569012 -5796893
-9576922 -9825877
-3967715 -6763234
823556 3427207
2193794 203189...

output:

158044
149588
161386
175355
62007
158512
59307
98546
129576
7543
163785
11450
26075
27588
79882
80669
104604
125167
133668
162584
190217
167772
26782
39072
67560
73630
83952
16883
21410
25538
32307
59661
134803
13851
44733
123139
129058
171814
189374
23179
194392
49260
52361
60105
74296
107052
14518...

result:

ok AC

Test #23:

score: 50
Accepted
time: 458ms
memory: 12932kb

input:

99997 199995
4221355 99124
-52606 7054416
7502472 60863
-80879 -2571632
-6014914 -74269
26607 5477733
-8554041 23103
-4433926 4139
93315 8678552
6410846 62326
-1633 -7998413
-790 -1445583
98650 -7841246
-60132 3337680
4830 -1929327
-79952 -1954585
55744 -6424464
-9773597 -3353
-21614 6828894
-43354 ...

output:

90187
64572
71916
79933
105735
171204
186325
70807
84217
32999
32853
172698
118281
79541
72127
158296
149760
124174
163289
132270
124685
191540
41144
166746
76614
140508
3035
126909
7907
148908
151607
137805
147046
295
6727
27522
82281
90892
133397
170792
145896
181259
33142
65709
2227
48180
68535
1...

result:

ok AC

Test #24:

score: 50
Accepted
time: 453ms
memory: 13520kb

input:

99996 199993
-7485809 497
1390443 -5441
-5401475 8919
9194227 -8110
-5001 -1917281
-8122 -4750988
3536148 -3021
2408 -7035391
9543167 -3551
-9884 -7750908
-1174 433673
-5517092 -5840
2404624 7663
-2932745 -9442
9878 -1142401
-40 -6333670
-440 5237984
441 4663960
6850 5556721
-4644 7013362
5085996 -5...

output:

64863
78480
91952
12240
102018
107574
181169
68806
138374
155452
111754
158303
160337
92242
47045
145522
178453
168097
4296
33086
44873
74716
100182
116782
198808
71108
74948
132997
145428
168284
161052
24085
60689
88097
11860
71754
92648
97337
149009
157235
70926
97990
196657
22981
95101
104762
155...

result:

ok AC

Test #25:

score: 50
Accepted
time: 452ms
memory: 12744kb

input:

100000 200000
9836027 9259046
9141664 9853111
-9592540 -9234225
9395407 -9818901
9155502 9005445
-9035350 -9065876
9148785 -9976277
9250953 9602169
9564656 9758527
-9991922 9362223
9638786 -9994059
-9519393 9169397
9455605 -9117629
9610585 -9723463
9397071 9523003
-9770348 -9131324
9430686 9493469
-...

output:

16443
150814
175241
1685
31697
91424
161266
94671
173246
101491
124945
57896
68290
110681
149247
187982
198126
126586
17042
97446
131588
20767
60572
77070
158107
186113
20048
22482
27306
120162
156918
30279
44110
29977
127851
160678
106505
15716
31023
56677
64356
157970
164305
181752
194097
168475
3...

result:

ok AC

Test #26:

score: 50
Accepted
time: 418ms
memory: 13356kb

input:

99998 199992
8965847 -33318
-2822530 17955
3291890 19895
6404732 -33096
-4434952 -7491900
1850415 4902
-2754428 -4964511
-6757281 -23208
3492139 -9242
-7393956 1730858
-2448932 -29478
9781425 -20171
4105143 7574939
5191560 1452540
-9242683 -4228
-4230820 -4813
4039260 25453
-26169 27979
158858 30833...

output:

58035
3046
195860
69709
149146
119999
61884
152297
33903
106154
195049
141384
30812
152604
177
72297
97354
53666
30669
111731
48957
43352
117704
59866
113016
90110
37290
5998
114816
126356
39787
112482
143450
32371
39050
30940
100206
33581
190098
167724
184466
189309
155881
164624
184999
118786
7340...

result:

ok AC

Test #27:

score: 50
Accepted
time: 433ms
memory: 12696kb

input:

99991 199999
-4778141 6528999
4681620 6930238
8098538 9671950
-6158979 9000870
-693504 -1820831
3125268 391519
9337880 -458792
-7176026 1646623
-6517399 -3830364
-8768363 -6040522
-6722047 3633670
2719325 3251406
3328318 9817233
-204781 6152270
9951727 1109754
-3881139 -1413837
-6042033 -4971163
695...

output:

125012
123985
98725
41010
80813
108114
69010
113886
190388
198163
162467
133610
168399
5873
104699
104515
122530
177159
6073
159306
42855
13521
73553
191137
141974
133625
77699
180794
125726
53381
5998
85196
153086
27784
152091
134189
133736
46580
37724
197361
189583
49806
157483
163002
51760
40665
...

result:

ok AC

Test #28:

score: 50
Accepted
time: 458ms
memory: 13196kb

input:

100000 200000
-1744459 -8428180
-3155400 -7807900
-1953045 -3236722
6760721 2177110
-565496 2234942
922485 -1941246
2272900 -7446700
-2122631 6043836
8207129 -9929791
-7681076 3410905
1342300 2529900
8212961 -7115599
-1956900 -5681600
-1861593 -154191
35500 6507000
2403473 -276174
-6955200 2729300
-...

output:

146657
6365
151112
195522
146583
73789
100129
118050
159121
68768
103420
22756
128187
154664
162385
194032
130213
85420
108501
34515
145636
126067
189251
70371
133904
62037
99841
142315
79430
165977
88103
48017
128300
76204
101366
117740
182732
101018
184117
198896
97621
10096
48600
78342
110235
194...

result:

ok AC

Test #29:

score: 50
Accepted
time: 454ms
memory: 12896kb

input:

99995 199995
-2481916 -1069451
-2865135 1293145
82997 -5359290
1272006 2556169
783178 -1900007
-3873534 6407112
1782675 -3201962
3526316 -2582971
-3469418 -3259646
1238110 -2115857
-2695529 417070
-2122003 1210063
3593136 1365617
74629 5321678
1678034 1570779
3448419 -4554050
2584010 2489252
5234418...

output:

40672
194442
62754
179560
1070
9596
130519
6742
160866
190774
147012
53484
192997
123482
25938
114865
169575
153251
108084
24850
82828
109620
18470
170115
192588
151721
108127
130573
34650
132364
180781
34758
84731
190994
6584
41228
41847
102459
115784
136444
173571
5436
31417
66113
78779
91194
1295...

result:

ok AC

Test #30:

score: 50
Accepted
time: 435ms
memory: 13212kb

input:

100000 200000
-1007327 669624
5756005 -746672
-54422 5968122
5710841 1217489
-7980712 -460049
-2209478 2805265
-8072576 276441
65075 -2428003
253080 -1498180
1823714 -6230033
-7219178 -3498801
-3554627 -14377
437142 -5724539
1736810 3638150
518595 -3074244
1821457 -5798646
-3022760 5457195
1826452 -...

output:

53639
38551
67621
72821
80004
87230
149117
149754
984
62075
144540
173054
194212
28269
29454
39719
103916
114509
116706
133897
195224
33273
48937
98518
113256
136249
163471
169624
179620
193644
30418
181475
24914
56239
71395
77507
82331
102692
129430
133855
136416
144516
162576
166185
188965
25550
1...

result:

ok AC