# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
547471 |
2022-04-10T19:58:08 Z |
beaconmc |
Stove (JOI18_stove) |
PyPy 3 |
|
34 ms |
18184 KB |
n,k = map(int, input().split())
sus = []
for i in range(n):
sus.append(int(input()))
sus.sort()
realsus = []
for i in range(len(sus)-1):
realsus.append(sus[i+1] - sus[i])
realsus.sort()
ans = k
for i in range(n-k):
ans += realsus[i]
ans += k
print(ans)
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
34 ms |
18184 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
34 ms |
18184 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
34 ms |
18184 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |