提交记录 7903


用户 题目 状态 得分 用时 内存 语言 代码长度
Ezio noip18a. 【NOIP2018】铺设道路 Accepted 100 2.619 ms 404 KB C++ 328 B
提交时间 评测时间
2019-01-25 19:38:21 2020-08-01 01:10:08
#include <stdio.h>
#include<algorithm>

int n;
int ans;
int a[100000+3];

int main() {
        scanf("%d",&n);
        for(int i=1;i<=n;i++){
                scanf("%d",&a[i]);
                ans+=a[i];
        }
        for(int i=1;i<n;i++)
                ans-=std::min(a[i],a[i+1]);
        printf("%d\n",ans);
	return 0;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #19.02 us20 KBAcceptedScore: 10

Testcase #212.14 us20 KBAcceptedScore: 10

Testcase #313.23 us20 KBAcceptedScore: 10

Testcase #49.72 us20 KBAcceptedScore: 10

Testcase #510 us20 KBAcceptedScore: 10

Testcase #615.34 us20 KBAcceptedScore: 10

Testcase #733.8 us24 KBAcceptedScore: 10

Testcase #8266.51 us56 KBAcceptedScore: 10

Testcase #91.311 ms216 KBAcceptedScore: 10

Testcase #102.619 ms404 KBAcceptedScore: 10


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