QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#943827#2308. 胖lunchbox #60 402ms6016kbC++172.9kb2025-03-20 06:42:522025-03-20 06:42:52

詳細信息


Pretests


Final Tests

Test #1:

score: 10
Accepted
time: 19ms
memory: 5668kb

input:

1000 100
2 2 3 4 2 4 4 4 1 1 4 1 4 3 3 4 2 1 2 2 3 2 4 3 1 4 3 2 4 4 4 3 1 1 4 2 3 3 3 2 3 1 3 4 2 4 3 3 1 1 4 3 3 2 4 2 2 4 4 1 1 2 4 1 3 1 4 3 4 2 4 3 4 1 1 3 2 1 4 3 2 1 4 2 2 3 2 3 2 4 1 4 2 2 4 2 2 1 3 257799480 361327555 541424941 840754242 114131228 500635419 338541381 180792758 687484973 979...

output:

36662
1181
1264
1172
1192
1203
1182
1173
1189
1189
1194
1184
1119
1121
1239
1164
1203
1165
1213
1245
1100
1163
1273
1185
1189
1213
1148
1132
1136
1172
1179
1287
1310
1215
1203
1179
1161
1253
1183
1388
1207
1202
1123
1190
1116
1180
1190
1143
1166
1180
1117
1159
1155
1192
1194
1134
1146
1208
1162
1112...

result:

ok 100 lines

Test #2:

score: 10
Accepted
time: 20ms
memory: 3584kb

input:

1000 100
4 2 2 3 3 1 1 3 4 2 1 2 1 3 4 4 4 2 1 1 4 2 2 2 1 2 4 3 1 4 2 3 1 4 3 2 4 2 4 2 4 1 2 1 2 2 1 4 3 2 2 2 1 1 1 3 1 1 3 4 3 3 2 1 2 2 2 1 1 2 3 2 4 2 2 3 4 1 2 2 4 3 2 2 2 4 2 1 4 3 1 4 2 3 1 3 1 2 3 892053145 153851502 4844898 616783872 382955829 330111138 227619359 723153178 70982398 147722...

output:

21891
1304
1233
1188
1174
1192
1307
1198
1141
1174
1174
1209
1231
1155
1208
1279
1148
1169
1131
1221
1165
1197
1181
1212
1198
1218
1230
1130
1246
1124
1115
1184
1189
1155
1141
1121
1208
1112
1177
1161
1248
1159
1172
1163
1243
1184
1201
1204
1165
1159
1181
1185
1143
1157
1202
1184
1156
1148
1192
1358...

result:

ok 100 lines

Test #3:

score: 10
Accepted
time: 279ms
memory: 6016kb

input:

200000 41298
3 2 3 1 1 1 4 1 4 2 4 2 2 4 3 3 3 1 4 1 1 4 1 4 3 1 2 3 4 1 4 4 1 2 2 4 4 2 3 1 4 3 3 4 3 2 2 3 4 4 3 3 4 4 1 3 3 1 3 3 3 4 1 4 2 1 1 3 4 3 4 2 4 4 1 1 2 3 2 2 2 4 3 1 2 4 2 1 2 4 1 1 3 4 1 3 3 2 2 4 2 3 4 3 2 2 2 1 2 4 2 2 1 2 4 3 1 2 3 3 4 2 2 1 3 3 4 1 3 1 3 3 3 4 3 1 3 3 3 1 4 2 1 2...

output:

4798851
9197738
9397444
5598493
10197454
4598797
3599938
2800161
1601279
5198793
3799222
4398892
5398894
5198859
3399805
3599586
8597663
5998467
2000734
2800193
601781
601808
6398469
1801055
9797536
6598021
4998906
5998442
4399247
9597295
5998644
9597376
5198852
4798687
4598787
7197998
6398180
20005...

result:

ok 41298 lines

Test #4:

score: 10
Accepted
time: 280ms
memory: 6016kb

input:

200000 41303
3 3 3 3 1 3 1 4 4 1 3 2 1 3 1 2 2 4 2 3 3 2 4 1 3 2 2 3 1 4 3 2 4 1 2 1 1 2 4 4 2 2 4 1 1 3 1 3 4 1 4 1 3 2 2 2 2 2 3 4 1 3 1 1 1 2 1 4 2 1 2 2 3 3 1 3 4 4 4 4 1 4 4 2 3 3 2 1 3 1 2 1 1 3 4 3 3 2 2 4 3 3 3 4 2 4 2 3 2 1 4 3 1 4 2 3 2 2 4 2 1 4 2 3 2 3 4 2 2 2 3 3 2 4 1 2 1 3 3 2 2 2 2 1...

output:

8597554
4399118
602069
4599026
6798205
3599600
6398264
3599891
6598213
3199974
3199810
1001867
10997058
8597449
6198574
4998687
3399747
4199233
5598521
9797339
1001569
1201360
8197686
6797928
1001827
9397573
5998286
2200632
4199655
9397830
6798151
402060
5198542
2400960
3999249
3799555
7798164
59984...

result:

ok 41303 lines

Test #5:

score: 10
Accepted
time: 399ms
memory: 5888kb

input:

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

output:

799999
1999889
800024
600022
600082
2399851
2599848
1999871
1999864
600124
600070
2199868
600027
400066
1799894
600124
2199846
1599894
200146
1799879
999974
1599890
1199936
1399969
400058
600040
800063
600059
1599897
2799834
1799874
1599917
2199854
2999792
999963
400022
2399881
1799889
1599914
27998...

result:

ok 23570 lines

Test #6:

score: 10
Accepted
time: 402ms
memory: 6016kb

input:

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

output:

400015
400070
3399808
2199867
1599917
800008
400061
2199842
400100
200223
600057
2599858
999983
600077
1599896
3199794
1199953
1599899
200104
1999876
1799879
1399927
600065
1199939
200159
1999880
2199871
1799872
400062
1799898
999967
600082
200084
600096
799956
999991
1399916
1599905
400081
1799905
...

result:

ok 23570 lines

Test #7:

score: 0
Time Limit Exceeded

input:

200000 20335
3 4 4 2 4 2 1 3 1 2 2 2 4 2 3 4 4 1 4 1 2 3 1 1 4 4 1 4 4 2 1 2 4 2 3 3 1 2 3 2 4 2 2 1 2 1 1 4 2 4 2 4 4 4 4 1 4 1 2 3 2 1 1 1 3 2 2 3 2 3 3 1 4 1 3 4 3 1 1 4 1 2 1 1 3 3 1 2 3 1 2 3 3 2 2 1 3 2 3 2 2 1 2 3 3 1 3 3 1 2 4 4 1 4 2 3 3 3 2 4 4 3 1 2 4 3 3 4 1 1 4 1 1 3 4 4 4 4 2 2 2 3 2 1...

output:


result:


Test #8:

score: 0
Time Limit Exceeded

input:

200000 20337
3 1 1 1 2 3 4 2 4 1 4 2 1 3 2 3 4 3 2 4 1 3 3 4 3 2 3 3 4 3 3 1 1 3 4 1 2 2 1 1 4 2 3 3 4 3 2 3 2 2 3 3 3 2 1 3 2 2 3 4 4 3 2 4 4 1 1 2 4 1 1 1 2 3 4 2 1 2 2 3 1 3 4 2 4 4 1 2 4 3 3 1 1 3 2 1 2 1 2 1 3 1 3 3 3 3 4 2 3 4 1 4 2 2 1 4 1 3 1 3 4 3 4 3 4 1 2 1 2 1 2 1 4 1 3 2 4 4 1 3 1 3 2 1...

output:


result:


Test #9:

score: 0
Time Limit Exceeded

input:

200000 20337
4 2 2 3 4 4 4 2 3 2 3 4 1 4 4 3 4 4 3 1 2 2 2 3 1 3 3 4 4 2 4 4 2 3 4 4 3 2 2 4 3 3 4 3 1 3 4 3 3 3 1 2 3 3 3 1 4 1 4 3 2 1 2 4 2 4 2 1 1 3 2 4 1 2 1 1 1 3 3 1 2 3 4 4 4 1 2 2 3 2 3 1 3 2 4 2 4 4 3 3 4 1 1 1 2 1 1 1 1 4 2 3 1 1 3 2 3 4 3 4 3 4 1 3 1 1 1 3 2 4 2 3 4 2 4 4 2 3 3 2 4 1 4 1...

output:


result:


Test #10:

score: 0
Time Limit Exceeded

input:

200000 20334
4 4 3 1 3 4 3 3 2 1 2 4 1 3 4 4 2 4 3 4 2 2 2 3 4 2 1 4 1 1 4 3 4 3 1 1 1 2 3 4 1 4 3 3 4 1 3 1 2 4 3 4 1 2 4 2 1 2 3 4 4 1 1 4 1 1 3 2 3 4 4 1 4 1 2 1 2 1 1 3 4 1 1 3 4 2 1 1 4 4 4 3 4 4 4 2 3 3 4 2 3 1 3 4 4 3 3 2 2 3 4 2 4 2 4 3 3 3 4 1 4 4 1 1 4 4 3 1 1 1 2 4 3 4 2 3 3 3 2 4 4 3 4 2...

output:


result: