LA 7150. ACM-ICPC World Finals 2015 A. Amalgamated Artichokes

Posted Planet6174

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LA 7150. ACM-ICPC World Finals 2015 A. Amalgamated Artichokes相关的知识,希望对你有一定的参考价值。

水题

#include <cstdio>
#include <cmath>
#include <algorithm>
int main() {
  int p, a, b, c, d, n;
  scanf("%d%d%d%d%d%d", &p, &a, &b, &c, &d, &n);
  double maxans = p * (sin(a + b) + cos(c + d) + 2), ans = 0;
  for (int k = 2; k <= n; k++) {
    double cur = p * (sin(a * k + b) + cos(c * k + d) + 2);
    maxans = std::max(maxans, cur);
    ans = std::max(ans, maxans - cur); 
  }
  printf("%.9lf\n", ans);
  return 0;
}

以上是关于LA 7150. ACM-ICPC World Finals 2015 A. Amalgamated Artichokes的主要内容,如果未能解决你的问题,请参考以下文章

LA 8043. ACM-ICPC World Finals 2017 E. Need for Speed

acm-icpc 有一道题(好像是World Final的),要求判断一个多项式是不是恒为整数,求这道题,急!

2018 ACM-ICPC World Finals Gym-102482C Conquer the World

2018 ACM-ICPC World Finals - Beijing

2018 ACM-ICPC World Finals Gym-102482I Triangles

World Cup(The 2016 ACM-ICPC Asia China-Final Contest dfs搜索)