57
34
61
68
41
14
69
48
27
59
67
14
83
33
20
48
34
32
22
98
42
2
97
22
61
6
<125 bytes omitted>
用户输出
1322
1
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#6560 | #1085. 山路 | Wrong Answer | 0 | 8413 ms | 129840 K | Python 3 / 339 B | xiedada | 2024-11-16 16:50:27 |
ndata = int(input())
pathList = [int(input())]
costList = []
for i in range(ndata-1):
curH = int(input())
if input != pathList[-1]:
pathList.append(curH)
for i in range(min(pathList),max(pathList)+1):
costList.append(sum([abs(j-i) for j in pathList]))
print(min(costList))
print(costList.count(min(costList)))
57
34
61
68
41
14
69
48
27
59
67
14
83
33
20
48
34
32
22
98
42
2
97
22
61
6
<125 bytes omitted>
用户输出
1322
1
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
31
78
56
26
34
36
13
24
95
99
72
52
67
70
50
19
61
61
82
3
59
10
80
12
35
8
<27 bytes omitted>
用户输出
685
1
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
962
688
49
172
196
137
703
333
768
844
247
396
502
970
9
31
640
902
2
679
165
4
<4592 bytes omitted>
用户输出
244525
3
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
225
499
96
634
519
686
975
308
921
868
238
994
890
396
305
252
234
535
395
92
37
<1004 bytes omitted>
用户输出
56746
1
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
588
136
602
174
714
394
719
127
662
852
150
594
633
67
963
56
563
252
543
384
78
<2775 bytes omitted>
用户输出
150131
2
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
564
330
647
380
958
375
676
490
497
334
454
885
138
92
756
855
395
148
674
771
2
<2674 bytes omitted>
用户输出
141629
9
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
17563
5447
1964
1648
5144
8316
11
5554
3298
4092
5007
648
9117
1168
3425
5947
9874
<103395 bytes omitted>
9182
3122
8242
982
5447
4045
5917
9779
6908
401
6503
1836
8771
7277
5354
5841
4203
<53939 bytes omitted>
1601195
119630364
23627258
914169197
863918805
147553566
886540488
792602150
410454179
4334
<17363781 bytes omitted>