提交记录 6947
提交时间 |
评测时间 |
2018-11-17 15:56:10 |
2020-08-01 00:54:45 |
#include <bits/stdc++.h>
using namespace std;
int n,x,y,sum;
int main()
{
scanf("%d",&n);
for (int i=1;i<=n;i++)
{
scanf("%d",&y);
if (y>x)
{
sum+=y;
sum-=x;
}
x=y;
}
printf("%d",sum);
return 0;
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 33.49 us | 36 KB | Accepted | Score: 10 | 显示更多 |
Testcase #2 | 40.31 us | 36 KB | Accepted | Score: 10 | 显示更多 |
Testcase #3 | 42.64 us | 36 KB | Accepted | Score: 10 | 显示更多 |
Testcase #4 | 37.12 us | 36 KB | Accepted | Score: 10 | 显示更多 |
Testcase #5 | 37.34 us | 36 KB | Accepted | Score: 10 | 显示更多 |
Testcase #6 | 42.23 us | 36 KB | Accepted | Score: 10 | 显示更多 |
Testcase #7 | 63.04 us | 36 KB | Accepted | Score: 10 | 显示更多 |
Testcase #8 | 313.34 us | 36 KB | Accepted | Score: 10 | 显示更多 |
Testcase #9 | 1.481 ms | 36 KB | Accepted | Score: 10 | 显示更多 |
Testcase #10 | 2.923 ms | 36 KB | Accepted | Score: 10 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2024-12-05 10:34:32 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠