提交记录 9809
提交时间 |
评测时间 |
2019-07-16 15:39:20 |
2020-08-01 01:53:15 |
#include<bits/stdc++.h>
int main()
{
int ans=0,a=0,cnt,n;
scanf("%d%d",&n,&cnt);
ans=cnt;
for(register int i=2;i<=n;i++)
{
scanf("%d",&a);
if(cnt<a) ans+=a-cnt;
cnt=a;
}
printf("%d",ans);
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 35.01 us | 36 KB | Accepted | Score: 10 | 显示更多 |
Testcase #2 | 44.24 us | 36 KB | Accepted | Score: 10 | 显示更多 |
Testcase #3 | 44.68 us | 36 KB | Accepted | Score: 10 | 显示更多 |
Testcase #4 | 37.07 us | 36 KB | Accepted | Score: 10 | 显示更多 |
Testcase #5 | 37.41 us | 36 KB | Accepted | Score: 10 | 显示更多 |
Testcase #6 | 41.17 us | 36 KB | Accepted | Score: 10 | 显示更多 |
Testcase #7 | 59.24 us | 36 KB | Accepted | Score: 10 | 显示更多 |
Testcase #8 | 280.38 us | 36 KB | Accepted | Score: 10 | 显示更多 |
Testcase #9 | 1.318 ms | 36 KB | Accepted | Score: 10 | 显示更多 |
Testcase #10 | 2.602 ms | 36 KB | Accepted | Score: 10 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2024-12-05 10:21:52 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠