提交记录 6916
| 提交时间 |
评测时间 |
| 2018-11-16 20:34:03 |
2020-08-01 00:54:11 |
#include<bits/stdc++.h>
using namespace std;
int getint(){
int ans=0,f=1;
char c=getchar();
while(c>'9'||c<'0'){
if(c=='-')f=-1;
c=getchar();
}
while(c>='0'&&c<='9'){
ans=ans*10+c-'0';
c=getchar();
}
return ans*f;
}
int main(){
int n=getint();
int lst=0,ans=0,mn=1926081700;
for(int i=0;i<n;i++){
int x=getint();
if(lst<x)ans+=x-lst;
lst=x;
}
printf("%d",ans);
return 0;
}
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 33.76 us | 36 KB | Accepted | Score: 10 | 显示更多 |
| Testcase #2 | 39.71 us | 36 KB | Accepted | Score: 10 | 显示更多 |
| Testcase #3 | 41.41 us | 36 KB | Accepted | Score: 10 | 显示更多 |
| Testcase #4 | 33.39 us | 36 KB | Accepted | Score: 10 | 显示更多 |
| Testcase #5 | 35.48 us | 36 KB | Accepted | Score: 10 | 显示更多 |
| Testcase #6 | 36.12 us | 36 KB | Accepted | Score: 10 | 显示更多 |
| Testcase #7 | 45.88 us | 36 KB | Accepted | Score: 10 | 显示更多 |
| Testcase #8 | 144.5 us | 36 KB | Accepted | Score: 10 | 显示更多 |
| Testcase #9 | 653.92 us | 36 KB | Accepted | Score: 10 | 显示更多 |
| Testcase #10 | 1.27 ms | 36 KB | Accepted | Score: 10 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-04-09 07:20:37 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠