提交记录 49325
提交时间
评测时间
2026-09-19 15:53:54
2026-09-19 15:55:02
代码
#include <stdio.h>
int main(){
int n; if(scanf("%d",&n)!=1) return 0;
long long ans=0, prev=0;
for(int i=0;i<n;i++){ int d; scanf("%d",&d); if(d>prev) ans += d-prev; prev=d; }
printf("%lld\n", ans);
return 0;
}
评测结果 Compilation N/A N/A Compile OK Score: N/A 显示更多
Testcase #1 12.18 us 16 KB Accepted Score: 10 显示更多
Testcase #2 9.19 us 16 KB Accepted Score: 10 显示更多
Testcase #3 8.83 us 16 KB Accepted Score: 10 显示更多
Testcase #4 9.26 us 16 KB Accepted Score: 10 显示更多
Testcase #5 9.77 us 16 KB Accepted Score: 10 显示更多
Testcase #6 14.3 us 16 KB Accepted Score: 10 显示更多
Testcase #7 33.18 us 16 KB Accepted Score: 10 显示更多
Testcase #8 256.69 us 16 KB Accepted Score: 10 显示更多
Testcase #9 1.293 ms 16 KB Accepted Score: 10 显示更多
Testcase #10 2.575 ms 16 KB Accepted Score: 10 显示更多
Judge Duck Online | 评测鸭在线
Server Time: 2026-09-23 12:47:09 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠