1 条题解
-
0Tabing010102 (tabing) LV 0 MOD @ 2019-11-23 15:41:25
std from xhz
//std from xhz #include<iostream> int a[1000010]; int main(){ // freopen("in0.txt","r",stdin); // freopen("out0.txt","w",stdout); int n=0,k=0,s=0; scanf("%d",&n); for (int i=0;i<n;i++){ scanf("%d",&a[i]); if (i!=0 && a[i]<a[i-1]){ s=s+a[i-1]-k; s=s%100000; k=a[i]; } } s=s+a[n-1]-k; s=s%100000; printf("%d",s); }
- 1
信息
- ID
- 1029
- 难度
- 8
- 分类
- (无)
- 标签
- (无)
- 递交数
- 72
- 已通过
- 9
- 通过率
- 12%
- 上传者