QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#882848#3226. Distance SumangletrisectionTL 1143ms131308kbC++145.3kb2025-02-05 11:55:542025-02-05 11:55:54

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 37028kb

input:

10
5 1
2 1
1 1
4 1
2 1
5 1
2 1
2 1
5 1

output:

0
3
4
6
6
8
9
11
12
14

result:

ok 10 lines

Test #2:

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

input:

10
5 1
10 1
5 1
3 1
5 1
5 1
1 1
3 1
1 1

output:

0
4
4
6
6
7
8
12
14
16

result:

ok 10 lines

Test #3:

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

input:

10
4 1
7 1
9 1
3 1
7 1
1 1
7 1
6 1
3 1

output:

0
5
6
9
11
12
12
13
15
17

result:

ok 10 lines

Test #4:

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

input:

10
1 1
9 1
9 1
6 1
9 1
3 1
10 1
1 1
3 1

output:

0
1
3
5
7
8
10
13
13
15

result:

ok 10 lines

Test #5:

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

input:

10
6 1
6 1
3 1
3 1
1 1
1 1
9 1
3 1
1 1

output:

0
2
3
5
6
7
9
12
13
16

result:

ok 10 lines

Test #6:

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

input:

10
8 1
10 1
6 1
3 1
1 1
1 1
4 1
5 1
4 1

output:

0
4
6
6
9
10
13
14
18
19

result:

ok 10 lines

Test #7:

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

input:

10
5 1
8 1
9 1
1 1
1 1
5 1
5 1
1 1
1 1

output:

0
2
4
7
7
9
10
11
13
15

result:

ok 10 lines

Test #8:

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

input:

10
5 1
5 1
8 1
4 1
5 1
4 1
1 1
2 1
7 1

output:

0
4
5
6
6
7
9
11
13
16

result:

ok 10 lines

Test #9:

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

input:

10
4 1
1 1
3 1
3 1
5 1
6 1
6 1
8 1
4 1

output:

0
3
3
4
5
7
10
13
16
19

result:

ok 10 lines

Test #10:

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

input:

10
8 1
10 1
8 1
4 1
9 1
10 1
1 1
8 1
8 1

output:

0
2
4
5
7
9
11
11
12
13

result:

ok 10 lines

Test #11:

score: 0
Accepted
time: 1143ms
memory: 131308kb

input:

200000
109891 65231
171839 5776
32431 29819
62570 71905
153470 68881
188361 76298
151469 77636
75162 130242
95864 47113
191182 742
121927 111781
18165 51034
158645 36001
193496 189958
143195 29723
140274 86466
117583 23287
184465 144332
35935 128306
192514 116854
27679 197718
138926 123165
46773 177...

output:

0
2128476
3615067
4333135
5793589
7104606
7876598
9621410
10959705
12443304
12989537
15017823
15660417
16551255
18007974
18487621
20027188
21203385
22454974
22931660
23796204
25173856
26195907
27604778
28662852
29446260
30856590
32645490
33338651
34979442
36020161
37417274
38263592
39224218
40460394...

result:

ok 200000 lines

Test #12:

score: -100
Time Limit Exceeded

input:

200000
196697 155143
178488 159177
49016 18473
171950 94863
69271 100194
160889 20733
40420 19766
191138 127108
142060 2610
194472 41608
6942 105158
61037 3025
150904 197834
58272 30296
5859 116513
104509 1986
48140 173435
131223 123177
175812 40180
28608 98965
157005 67994
127784 114441
17436 68620...

output:

0
11320917384
11874614449
15772614655
18523775058
21957641652
30009559722
31970095838
35324661901
38253652284
48493111245
51933582990
58121449414
67628507769
73905238960
83828871781
83828871781
86351127383
86906418351
88386492876
89035727731
94945127602
103238157194
103565667357
106031510890
1148471...

result: