传送门

 

这不能算是数论题。。。

卡精度这事noip也做的出来。。

 

#include <cmath>
#include <cstdio>

int n, ans;
double h, s1, v, l, k, r = 0.0001;

inline bool check(double x)
{
	double t1 = sqrt((h - k - r) / 5.0), t2 = sqrt(h / 5.0);
	double t3 = (s1 - x - r) / v, t4 = (s1 - x + l + r) / v;
	if(t1 > t4 || t2 < t3) return 0;
	return 1;
}

int main()
{
	scanf("%lf %lf %lf %lf %lf %d", &h, &s1, &v, &l, &k, &n);
	for(int i = 0; i < n; i++) ans += check(i);
	printf("%d\n", ans);
	return 0;
}

  

相关文章:

  • 2021-11-07
  • 2022-03-05
  • 2021-09-15
  • 2022-03-03
  • 2021-07-10
  • 2021-11-16
  • 2022-12-23
猜你喜欢
  • 2018-08-28
  • 2021-07-08
  • 2021-06-06
  • 2022-02-15
  • 2021-04-30
  • 2021-12-02
  • 2021-12-10
相关资源
相似解决方案