https://oj.uz/problem/view/IZhO17_road 如果不考虑方案数的话是非常好写的,类似上一题,我们只需要维护向下的 top3 和向上的 top1 即可。 然后用均值不等式可以得到最优解一定是 a*(b+c) | a >= b >= c。 #include using namespace lastweapon; const int N = int(1e5) + 9; i…
https://oj.uz/problem/view/IZhO17_road 如果不考虑方案数的话是非常好写的,类似上一题,我们只需要维护向下的 top3 和向上的 top1 即可。 然后用均值不等式可以得到最优解一定是 a*(b+c) | a >= b >= c。 #include using namespace lastweapon; const int N = int(1e5) + 9; i…
讨论
登录后参与讨论
还没有评论,来说第一句吧。