提交记录 11187
提交时间 |
评测时间 |
2019-11-03 10:41:04 |
2020-08-01 02:39:51 |
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
int n=0;
int day=0;
cin>>n;
int d[100000];
for(int i=1;i<=n;i++)//the road
{
cin>>d[i];
}
day=d[1];
for (int i=1;i<n;i++)
{
if(d[i+1]>d[i])
{
day=day+d[i+1]-d[i];
}
}
cout<<day;
return 0;
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 61.05 us | 424 KB | Accepted | Score: 10 | 显示更多 |
Testcase #2 | 70.46 us | 424 KB | Accepted | Score: 10 | 显示更多 |
Testcase #3 | 72.01 us | 424 KB | Accepted | Score: 10 | 显示更多 |
Testcase #4 | 64.7 us | 424 KB | Accepted | Score: 10 | 显示更多 |
Testcase #5 | 66.76 us | 424 KB | Accepted | Score: 10 | 显示更多 |
Testcase #6 | 86.28 us | 424 KB | Accepted | Score: 10 | 显示更多 |
Testcase #7 | 163.23 us | 424 KB | Accepted | Score: 10 | 显示更多 |
Testcase #8 | 1.067 ms | 424 KB | Accepted | Score: 10 | 显示更多 |
Testcase #9 | 5.755 ms | 424 KB | Accepted | Score: 10 | 显示更多 |
Testcase #10 | 11.51 ms | 424 KB | Accepted | Score: 10 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2024-12-05 10:20:37 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠