80,#3WA,求调,玄关
查看原帖
80,#3WA,求调,玄关
956382
Ravener楼主2024/3/23 12:39
#include<bits/stdc++.h>
using namespace std;
const double w=0.0001;
int main()
{
	double t1,t2,h,s,v,l,k;
	int sum=0,n;
	cin>>h>>s>>v>>l>>k>>n;
	if(h>k) t1=sqrt((h-k)/5);
	else t1=1e-6;
	t2=sqrt(h/5);
	for(int i=0;i<n;i++)
	{
		if((v*t1+i+w>=s&&v*t1+i-w<=s+l)||(v*t2+i+w>=s&&v*t2+i-w<=s+l)) sum++;
	}
	cout<<sum;
}
2024/3/23 12:39
加载中...