提交记录 10823
提交时间 |
评测时间 |
2019-10-03 20:47:07 |
2020-08-01 02:31:08 |
#include <bits/stdc++.h>
using namespace std;
int n,i,a[100005],hp=0;
int main(){
cin>>n;
for(i=1;i<=n;i++)
cin>>a[i];
for(i=1;i<=n;i++)
hp+=max(a[i]-a[i-1],0);
cout<<hp;
return 0;
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 36.97 us | 44 KB | Accepted | Score: 10 | 显示更多 |
Testcase #2 | 44.71 us | 44 KB | Accepted | Score: 10 | 显示更多 |
Testcase #3 | 39.13 us | 44 KB | Accepted | Score: 10 | 显示更多 |
Testcase #4 | 38.36 us | 44 KB | Accepted | Score: 10 | 显示更多 |
Testcase #5 | 40.97 us | 44 KB | Accepted | Score: 10 | 显示更多 |
Testcase #6 | 66.67 us | 44 KB | Accepted | Score: 10 | 显示更多 |
Testcase #7 | 138.25 us | 48 KB | Accepted | Score: 10 | 显示更多 |
Testcase #8 | 1.047 ms | 84 KB | Accepted | Score: 10 | 显示更多 |
Testcase #9 | 5.659 ms | 240 KB | Accepted | Score: 10 | 显示更多 |
Testcase #10 | 11.279 ms | 428 KB | Accepted | Score: 10 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2024-12-05 10:16:06 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠