摘要:
思路:已知当前的总长度和为len,当前的伤害为sum,伤害次数为 num.那么对下一个点的伤害值sum=sum+2*len+num;这个是通过(x+1)^2展开化简就能得到。#include#include#include#include#include#define Maxn 100010#define LL __int64#define inf 1e12using namespace std;LL num[Maxn],cnt[Maxn],n,k;bool OK(LL x){ LL suma,sumb,ans,po,i,numa; LL j=n; suma=sumb=an... 阅读全文