摘要: 思路:已知当前的总长度和为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... 阅读全文
posted @ 2013-10-17 15:31 fangguo 阅读(284) 评论(0) 推荐(0) 编辑