提交记录 8434


用户 题目 状态 得分 用时 内存 语言 代码长度
AThousandMoon noip18a. 【NOIP2018】铺设道路 Accepted 100 2.911 ms 404 KB C++ 258 B
提交时间 评测时间
2019-02-16 22:34:12 2020-08-01 01:18:48
#include<cstdio>
#define Rint register int
using namespace std;
const int N = 100003;
int n, d[N], ans;
int main(){
	scanf("%d", &n);
	for(Rint i = 1;i <= n;i ++){
		scanf("%d", d + i);
		if(d[i] > d[i - 1]) ans += d[i] - d[i - 1];
	}
	printf("%d\n", ans);
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #18.87 us20 KBAcceptedScore: 10

Testcase #212.12 us20 KBAcceptedScore: 10

Testcase #311.99 us20 KBAcceptedScore: 10

Testcase #49.91 us20 KBAcceptedScore: 10

Testcase #510.81 us20 KBAcceptedScore: 10

Testcase #615.73 us20 KBAcceptedScore: 10

Testcase #736.71 us24 KBAcceptedScore: 10

Testcase #8288.73 us56 KBAcceptedScore: 10

Testcase #91.472 ms216 KBAcceptedScore: 10

Testcase #102.911 ms404 KBAcceptedScore: 10


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