QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#38790#1461. Greedy AlgorithmZhaoZiLongTL 396ms5236kbC++202.1kb2022-07-07 13:48:402022-07-07 13:48:41

詳細信息

Test #1:

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

input:

2 3
1 2 3
4 5 99

output:

8

result:

ok 1 number(s): "8"

Test #2:

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

input:

3 3
3 2 4
2 2 3
5 4 6

output:

14

result:

ok 1 number(s): "14"

Test #3:

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

input:

5 4
3 6 10 8
0 6 8 8
2 4 5 6
1 5 9 6
3 6 11 12

output:

16

result:

ok 1 number(s): "16"

Test #4:

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

input:

2 5
5 3 6 9 0
4 7 9 4 0

output:

7

result:

ok 1 number(s): "7"

Test #5:

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

input:

2 25
16 78 57 53 34 41 38 99 13 81 57 94 31 83 70 13 54 95 10 4 40 77 7 3 84
99 44 69 4 63 51 8 96 78 75 40 0 71 60 77 64 33 61 49 83 79 68 24 80 89

output:

29

result:

ok 1 number(s): "29"

Test #6:

score: 0
Accepted
time: 33ms
memory: 4664kb

input:

2 50
319 86 426 335 98 216 341 303 475 38 447 159 155 169 471 38 54 78 65 165 214 482 479 243 433 444 232 235 213 314 350 315 144 470 241 174 160 271 497 458 90 45 44 54 195 46 272 308 387 87
378 305 489 14 95 144 460 201 424 418 472 495 60 19 15 483 283 136 392 439 401 26 487 185 377 339 341 281 44...

output:

54

result:

ok 1 number(s): "54"

Test #7:

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

input:

5 3
6 4 10
3 1 1
4 1 7
5 10 7
2 3 9

output:

13

result:

ok 1 number(s): "13"

Test #8:

score: 0
Accepted
time: 6ms
memory: 3584kb

input:

25 3
24 36 59
75 97 18
53 22 62
93 53 64
46 69 18
74 43 30
75 83 24
35 3 36
77 10 68
95 63 76
25 98 63
21 41 85
58 25 45
55 0 35
25 14 74
34 58 3
83 96 12
53 86 52
43 78 13
53 49 40
85 9 47
72 58 4
8 68 25
5 23 32
14 45 20

output:

29

result:

ok 1 number(s): "29"

Test #9:

score: 0
Accepted
time: 86ms
memory: 5236kb

input:

50 3
349 13 253
23 380 4
167 227 371
310 434 383
346 421 289
264 381 438
322 281 186
207 232 301
350 463 126
244 213 137
145 284 21
292 382 441
313 363 146
117 266 397
288 277 199
481 168 454
450 319 282
374 48 352
101 251 439
191 260 108
477 55 266
460 47 441
437 493 55
234 62 220
365 201 15
304 27...

output:

56

result:

ok 1 number(s): "56"

Test #10:

score: 0
Accepted
time: 133ms
memory: 4192kb

input:

17 23
94 58 175 125 214 145 239 172 13 41 226 155 228 81 78 219 51 76 232 177 51 194 223
119 162 109 17 169 67 173 4 201 139 5 127 60 133 27 142 155 143 27 209 67 43 181
157 213 159 139 217 7 37 132 147 128 28 172 57 144 53 97 176 102 39 87 145 88 123
213 199 207 128 134 82 88 8 122 214 68 153 130 9...

output:

58

result:

ok 1 number(s): "58"

Test #11:

score: 0
Accepted
time: 155ms
memory: 4524kb

input:

29 13
266 271 223 265 23 211 237 183 197 243 143 154 12
44 192 164 121 240 240 7 191 55 50 109 17 89
221 96 57 164 252 243 196 220 94 199 196 70 6
199 205 92 236 157 264 60 202 10 2 185 95 258
46 168 96 205 95 37 130 136 255 108 49 146 108
47 77 95 197 55 184 57 209 75 169 185 136 58
11 178 152 104 ...

output:

56

result:

ok 1 number(s): "56"

Test #12:

score: 0
Accepted
time: 15ms
memory: 3580kb

input:

50 50
3 4 4 2 2 5 2 4 3 2 5 1 4 5 5 1 3 0 3 5 4 0 0 0 0 4 3 5 3 4 1 4 2 4 1 0 5 0 2 2 3 0 0 0 2 4 3 2 2 5
1 3 5 4 0 1 0 3 3 5 2 2 5 0 0 0 1 4 1 1 0 3 2 3 5 1 3 1 5 5 0 4 0 1 3 5 4 3 5 5 2 3 5 4 3 2 2 2 0 5
1 5 2 5 5 5 1 4 2 2 1 4 2 2 0 3 5 0 2 0 0 4 4 4 0 2 1 0 4 1 0 0 5 4 1 2 0 1 1 0 1 0 2 3 4 1 4 ...

output:

973

result:

ok 1 number(s): "973"

Test #13:

score: 0
Accepted
time: 396ms
memory: 4000kb

input:

50 50
16 0 30 15 9 24 36 33 6 3 40 7 0 3 30 24 41 31 15 21 40 35 30 22 37 37 22 44 8 29 23 11 45 0 43 1 11 24 35 27 28 7 45 34 37 43 44 49 31 7
1 19 27 26 50 30 44 13 19 41 28 0 22 39 35 49 19 4 2 1 50 22 45 26 13 6 11 33 18 11 4 32 2 16 35 16 6 6 43 31 17 2 43 35 50 16 19 50 21 39
15 20 17 29 8 15 ...

output:

338

result:

ok 1 number(s): "338"

Test #14:

score: -100
Time Limit Exceeded

input:

50 50
466 446 229 241 470 452 312 103 167 60 40 262 482 318 204 403 287 89 8 92 24 491 153 499 388 96 210 428 128 194 479 141 223 406 338 260 90 459 338 402 134 401 249 43 93 55 263 149 217 432
38 307 488 27 264 286 461 406 376 182 384 205 387 461 270 423 269 156 17 127 191 374 467 305 301 24 465 42...

output:


result: