提交记录 9809


用户 题目 状态 得分 用时 内存 语言 代码长度
Dusker noip18a. 【NOIP2018】铺设道路 Accepted 100 2.602 ms 36 KB C++ 252 B
提交时间 评测时间
2019-07-16 15:39:20 2020-08-01 01:53:15
#include<bits/stdc++.h>

int main()
{
    int ans=0,a=0,cnt,n;
    scanf("%d%d",&n,&cnt);
    ans=cnt;
    for(register int i=2;i<=n;i++)
      {
          scanf("%d",&a);
          if(cnt<a) ans+=a-cnt;
          cnt=a;
      }
    printf("%d",ans);
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #135.01 us36 KBAcceptedScore: 10

Testcase #244.24 us36 KBAcceptedScore: 10

Testcase #344.68 us36 KBAcceptedScore: 10

Testcase #437.07 us36 KBAcceptedScore: 10

Testcase #537.41 us36 KBAcceptedScore: 10

Testcase #641.17 us36 KBAcceptedScore: 10

Testcase #759.24 us36 KBAcceptedScore: 10

Testcase #8280.38 us36 KBAcceptedScore: 10

Testcase #91.318 ms36 KBAcceptedScore: 10

Testcase #102.602 ms36 KBAcceptedScore: 10


Judge Duck Online | 评测鸭在线
Server Time: 2024-12-05 10:21:52 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠