QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#207571#7563. Fun on Treeucup-team1676RE 4119ms37076kbC++143.6kb2023-10-08 17:07:052023-10-08 17:07:06

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 4ms
memory: 20348kb

input:

6 6
1 1 4 5 1 4
1 5
2 0
3 2
4 1
5 6
3 2 -100000
1 2 100000
1 1 0
2 2 66
3 1 5
4 4 -3

output:

6 100005
6 10
6 10
1 4
1 -1
1 1

result:

ok 6 lines

Test #2:

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

input:

5 6
-10 0 2 -4 8
1 7
1 1
2 2
2 -2
1 1 100
2 1 -100
1 1 0
4 3 10
2 5 3
5 2 2

output:

4 -87
1 17
4 13
1 19
1 17
1 15

result:

ok 6 lines

Test #3:

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

input:

6 3
0 0 0 0 0 0
1 10
1 10
1 -100
4 10
4 11
1 1 0
4 1 0
1 4 1000

output:

2 10
6 11
2 10

result:

ok 3 lines

Test #4:

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

input:

2 0
1 1
1 3

output:


result:

ok 0 lines

Test #5:

score: 0
Accepted
time: 2846ms
memory: 34996kb

input:

200000 200000
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 ...

output:

119017 15000000000
120167 17000000000
119017 15000000000
119017 15000000000
120167 17000000000
120167 15000000000
120167 16000000000
119017 17000000000
119017 16000000000
119017 12000000000
119017 17000000000
120167 16000000000
120167 14000000000
120167 17000000000
120167 18000000000
120167 16000000...

result:

ok 200000 lines

Test #6:

score: 0
Accepted
time: 3129ms
memory: 36644kb

input:

200000 200000
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 ...

output:

169355 88000000000
171273 95000000000
171273 100000000000
169355 88000000000
169355 93000000000
169355 97000000000
169355 93000000000
171273 78000000000
171273 86000000000
169355 90000000000
169355 84000000000
169355 80000000000
169355 78000000000
171273 84000000000
169355 89000000000
171273 8400000...

result:

ok 200000 lines

Test #7:

score: 0
Accepted
time: 2436ms
memory: 35124kb

input:

200000 200000
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 ...

output:

60406 17000000000
163359 19000000000
163359 18000000000
163359 17000000000
163359 18000000000
60406 17000000000
163359 16000000000
60406 16000000000
60406 18000000000
163359 17000000000
163359 16000000000
163359 15000000000
163359 18000000000
163359 16000000000
60406 13000000000
163359 15000000000
6...

result:

ok 200000 lines

Test #8:

score: 0
Accepted
time: 2871ms
memory: 36616kb

input:

200000 200000
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 ...

output:

158239 95000000000
170228 90000000000
170228 91000000000
158239 97000000000
158239 90000000000
170228 97000000000
170228 95000000000
158239 89000000000
170228 84000000000
158239 97000000000
158239 88000000000
170228 81000000000
158239 89000000000
170228 84000000000
170228 84000000000
158239 83000000...

result:

ok 200000 lines

Test #9:

score: 0
Accepted
time: 2218ms
memory: 35136kb

input:

200000 200000
-999999197 -999999547 -999999355 -999999799 -999999360 -999999720 -999999365 -999999419 -999999958 -999999574 -999999169 -999999422 -999999695 -999999971 -999999820 -999999822 -999999107 -999999420 -999999519 -999999970 -999999601 -999999521 -999999134 -999999638 -999999338 -999999570 ...

output:

2841 999999254
109445 999999369
58340 999999315
117049 999999782
118472 999999076
24148 999999131
47844 999999290
113056 999999668
46680 999999228
109091 999999634
68365 999999666
156304 999999674
39689 999999729
103343 999999322
123506 999999661
189258 999999210
142816 999999890
88985 999999626
120...

result:

ok 200000 lines

Test #10:

score: 0
Accepted
time: 2458ms
memory: 36620kb

input:

200000 200000
-999999902 -999999301 -999999682 -999999655 -999999078 -999999674 -999999335 -999999307 -999999892 -999999582 -999999768 -999999854 -999999299 -999999298 -999999510 -999999440 -999999916 -999999930 -999999447 -999999825 -999999586 -999999447 -999999186 -999999634 -999999258 -999999756 ...

output:

43055 999999140
49534 999999915
34106 999999771
160878 999999227
148508 999999679
72994 999999134
163193 999999850
63938 999999143
54880 999999740
52045 999999113
26995 999999039
87143 999999281
74906 999999554
172131 999999137
138024 999999394
57682 999999637
62669 999999051
81932 999999518
33406 9...

result:

ok 200000 lines

Test #11:

score: 0
Accepted
time: 2250ms
memory: 35040kb

input:

200000 200000
-999999602 -999999216 -999999710 -999999943 -999999715 -999999936 -999999594 -999999877 -999999394 -999999644 -999999110 -999999223 -999999342 -999999960 -999999730 -999999642 -999999058 -999999863 -999999406 -999999319 -999999812 -999999634 -999999519 -999999599 -999999799 -999999846 ...

output:

183067 999999909
99888 999999736
7724 999999364
161568 999999298
93017 999999903
105263 999999788
62219 999999053
132842 999999223
45435 999999362
159394 999999759
25951 999999780
118834 999999191
154586 999999744
82508 999999076
164452 999999372
100552 999999562
155126 999999332
100719 999999406
19...

result:

ok 200000 lines

Test #12:

score: 0
Accepted
time: 2537ms
memory: 36504kb

input:

200000 200000
-999999723 -999999956 -999999679 -999999610 -999999755 -999999845 -999999359 -999999914 -999999060 -999999981 -999999093 -999999136 -999999983 -999999772 -999999112 -999999777 -999999827 -999999612 -999999413 -999999471 -999999757 -999999293 -999999685 -999999999 -999999791 -999999170 ...

output:

99717 999999755
15526 999999972
23346 999999932
42421 999999452
2286 999999049
193610 999999232
70168 999999164
26214 999999570
138962 999999287
155319 999999407
47662 999999714
111146 999999883
120662 999999304
98100 999999670
27642 999999638
20252 999999486
87487 999999101
177165 999999970
195686 ...

result:

ok 200000 lines

Test #13:

score: 0
Accepted
time: 4033ms
memory: 37064kb

input:

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

output:

189813 1486
189813 1227
31620 1530
31620 935
189813 917
189813 1403
189813 1394
31620 1303
189813 1096
189813 1287
189813 1298
189813 1322
189813 1167
31620 1527
189813 1337
31620 1313
189813 1393
189813 854
189813 1271
31620 1459
31620 806
189813 1076
189813 1148
189813 1300
189813 1282
189813 1265...

result:

ok 200000 lines

Test #14:

score: 0
Accepted
time: 4119ms
memory: 37076kb

input:

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

output:

86396 1446
86396 1315
196929 1328
86396 1593
196929 1461
86396 1387
196929 1155
196929 1477
196929 1623
86396 1359
196929 1195
86396 1751
86396 1267
196929 1726
86396 1399
86396 1486
196929 1612
196929 1021
86396 1608
196929 1229
196929 1591
86396 1455
196929 1589
86396 1486
86396 948
86396 1810
196...

result:

ok 200000 lines

Test #15:

score: -100
Runtime Error

input:

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

output:


result: