提交记录 9488
提交时间
评测时间
2019-05-25 11:48:32
2020-08-01 01:38:46
代码
#include<cstdio>
#define doit scanf("%d",&n);for(int i=1;i<=n;i++)scanf("%d",&a[i]);for(int i=2;i<=n;i++)if(a[i]>a[i-1])ans+=a[i]-a[i-1];printf("%d",ans+a[1]);return 0;
int n,a[100005],ans=0;
int main() {
doit
}
评测结果 Compilation N/A N/A Compile OK Score: N/A 显示更多
Testcase #1 8.68 us 20 KB Accepted Score: 10 显示更多
Testcase #2 11.96 us 20 KB Accepted Score: 10 显示更多
Testcase #3 11.98 us 20 KB Accepted Score: 10 显示更多
Testcase #4 9.6 us 20 KB Accepted Score: 10 显示更多
Testcase #5 11.34 us 20 KB Accepted Score: 10 显示更多
Testcase #6 16.69 us 20 KB Accepted Score: 10 显示更多
Testcase #7 36.94 us 24 KB Accepted Score: 10 显示更多
Testcase #8 285.53 us 56 KB Accepted Score: 10 显示更多
Testcase #9 1.421 ms 216 KB Accepted Score: 10 显示更多
Testcase #10 2.834 ms 404 KB Accepted Score: 10 显示更多
Judge Duck Online | 评测鸭在线
Server Time: 2024-12-05 10:27:28 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠