提交记录 44121
提交时间
评测时间
2026-08-18 22:54:14
2026-08-18 22:54:18
代码
#include <stdio.h>
int main(){
int n; scanf("%d",&n);
long long ans=0; int prev=0, d;
for(int i=0;i<n;i++){ 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 9.14 us 16 KB Accepted Score: 10 显示更多
Testcase #2 8.2 us 16 KB Accepted Score: 10 显示更多
Testcase #3 8.94 us 16 KB Accepted Score: 10 显示更多
Testcase #4 8.99 us 16 KB Accepted Score: 10 显示更多
Testcase #5 9.3 us 16 KB Accepted Score: 10 显示更多
Testcase #6 15.96 us 16 KB Accepted Score: 10 显示更多
Testcase #7 36.23 us 16 KB Accepted Score: 10 显示更多
Testcase #8 282.5 us 16 KB Accepted Score: 10 显示更多
Testcase #9 1.439 ms 16 KB Accepted Score: 10 显示更多
Testcase #10 2.869 ms 16 KB Accepted Score: 10 显示更多
Judge Duck Online | 评测鸭在线
Server Time: 2026-08-31 04:14:08 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠