提交记录 6947


用户 题目 状态 得分 用时 内存 语言 代码长度
slayone noip18a. 【NOIP2018】铺设道路 Accepted 100 2.923 ms 36 KB C++ 284 B
提交时间 评测时间
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;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #133.49 us36 KBAcceptedScore: 10

Testcase #240.31 us36 KBAcceptedScore: 10

Testcase #342.64 us36 KBAcceptedScore: 10

Testcase #437.12 us36 KBAcceptedScore: 10

Testcase #537.34 us36 KBAcceptedScore: 10

Testcase #642.23 us36 KBAcceptedScore: 10

Testcase #763.04 us36 KBAcceptedScore: 10

Testcase #8313.34 us36 KBAcceptedScore: 10

Testcase #91.481 ms36 KBAcceptedScore: 10

Testcase #102.923 ms36 KBAcceptedScore: 10


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