Gravatar
┭┮﹏┭┮
积分:4450
提交:907 / 1937

Gravatar
lgy
积分:33
提交:16 / 80
#include<iostream>
using namespace std;
int main()
{
//freopen("road.in","r",stdin);
//freopen("road.out","w",stdout);
long long n,d;
long long k,h=0,i,l=0,m=0,v=0,y=0,s=1,s1=1;
cin>>n>>d;
int a[n],b[(n+1)];
for(i=1;i<n;i++)
cin>>a[i];
for(i=1;i<=n;i++)
cin>>b[i];
while(y==0){
h=0;
for(i=(s+1);i<=n;i++){
if((b[i]<b[s])||(i==n)){
k=(i-s);break;
}
}
for(i=1;i<=k;i++){
h=h+a[i];
s++;
}
h-=v;
cout<<"h="<<h<<' ';
l=h/d;
if(h%d!=0)l++;
cout<<"l="<<l<<' ';
v+=l*d;
m+=l*b[s1];

题目 4017 [NOI 2024]登山
2024-09-22 18:00:44
Gravatar
music
积分:79
提交:41 / 66
回复 @father :
????????

题目 3927 [CSP 2023J]小苹果
2024-09-22 11:07:02
Gravatar
music
积分:79
提交:41 / 66
回复 @haoshuai :
不似泥萌

题目 3927 [CSP 2023J]小苹果
2024-09-22 11:06:45
Gravatar
haoshuai
积分:16
提交:12 / 35
hahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahha

题目 3927 [CSP 2023J]小苹果
2024-09-22 11:05:53
Gravatar
haoshuai
积分:16
提交:12 / 35
hahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahha

题目 3927 [CSP 2023J]小苹果
2024-09-22 11:05:50
Gravatar
haoshuai
积分:16
提交:12 / 35
hahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahha

题目 3927 [CSP 2023J]小苹果
2024-09-22 11:05:44
Gravatar
haoshuai
积分:16
提交:12 / 35
回复 @father :
hahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahahahahahahahaahhahahahahahahahahahaha

题目 3927 [CSP 2023J]小苹果
2024-09-22 11:05:37
Gravatar
father
积分:124
提交:83 / 172
hahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahaha

题目 3927 [CSP 2023J]小苹果
2024-09-22 11:03:19
Gravatar
haoshuai
积分:16
提交:12 / 35
三年oi一场空,不开long long三年oi一场空,不开long long 见祖宗三年oi一场空,不开long long 见祖宗三年oi一场空,不开long long 见祖宗三年oi一场空,不开long long 见祖宗三年oi一场空,不开long long 见祖宗三年oi一场空,不开long long 见祖宗三年oi一场空,不开long long 见祖宗三年oi一场空,不开long long 见祖宗三年oi一场空,不开long long 见祖宗三年oi一场空,不开long long 见祖宗三年oi一场空,不开long long 见祖宗三年oi一场空,不开long long 见祖宗三年oi一场空,不开long long 见祖宗三年oi一场空,不开long long 见祖宗三年oi一场空,不开long long 见祖宗三年oi一场空,不开long long 见祖宗三年oi一场空,不开long long 见祖宗三年oi一场空,不开long long 见祖宗三年oi一场空,不开long long 见祖宗三年oi一场空,不开long long 见祖宗三年oi一场空,不开long long 见祖宗三年oi一场空,不开

题目 3927 [CSP 2023J]小苹果
2024-09-22 11:03:08
Gravatar
haoshuai
积分:16
提交:12 / 35
malegebi

题目 3927 [CSP 2023J]小苹果
2024-09-22 11:01:47
Gravatar
haoshuai
积分:16
提交:12 / 35
回复 @father :
wish today the tei niang

题目 3927 [CSP 2023J]小苹果
2024-09-22 11:00:01
Gravatar
father
积分:124
提交:83 / 172
回复 @haoshuai :
hahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahaha

题目 3927 [CSP 2023J]小苹果
2024-09-22 10:58:21
Gravatar
haoshuai
积分:16
提交:12 / 35
三年oi一场空,不开long long 见祖宗

题目 3927 [CSP 2023J]小苹果
2024-09-22 10:56:44
Gravatar
music
积分:79
提交:41 / 66

Gravatar
GS53
积分:48
提交:17 / 66
超时。。。

Gravatar
AeeE5x
积分:478
提交:115 / 283
第一次徒手搓出来一棵线段树)
感觉自己已经差不多理解线段树了)

Gravatar
健康铀
积分:1725
提交:269 / 698
取余没看见被硬控了

Gravatar
健康铀
积分:1725
提交:269 / 698
noi自动评三星是吧,树的重心简化版一星不能再多了

Gravatar
健康铀
积分:1725
提交:269 / 698
唐丸了,写了没交