摘要: 死活TLE....求助 update 4.3 23:08 求助了tls之后终于过了...分治里次数界写崩了...r l+1就行... 分治的做法很神奇!本题的限制在于操作类型与权值相对大小有关,而用[l,mid]更新[mid+1,r]正好适应了本题的要求 cpp include include in 阅读全文
posted @ 2017-04-23 22:47 Candy? 阅读(484) 评论(0) 推荐(0) 编辑
摘要: 4801: 打牌 分类讨论就行了 比赛时一开始写挂了... cpp include include include include include using namespace std; typedef long long ll; const int N = (1'9'){if(c==' ')f= 阅读全文
posted @ 2017-04-23 22:17 Candy? 阅读(318) 评论(0) 推荐(0) 编辑
摘要: "hdu 4656 Evaluation" 题意:给出$n,b,c,d,f(x) = \sum_{i=1}^{n 1} a_ix^i$,求$f(b\cdot c^{2k}+d):0\le k include include include include include using namespac 阅读全文
posted @ 2017-04-23 22:17 Candy? 阅读(1077) 评论(0) 推荐(0) 编辑
摘要: "3451: Tyvj1953 Normal" 题意: N 个点的树,点分治时等概率地随机选点,代价为当前连通块的顶点数量,求代价的期望值 百年难遇的点分治一遍AC!!! 今天又去翻了一下《具体数学》上的离散概率,对期望有了一点新认识吧。 本题根据 期望的线性性质 ,计算每个点的代价期望加起来。 一 阅读全文
posted @ 2017-04-23 22:16 Candy? 阅读(820) 评论(0) 推荐(0) 编辑
摘要: "3509: [CodeChef] COUNTARI" 题意:统计满足$i include include include include include using namespace std; typedef long long ll; const int N = (1'9') {if(c==' 阅读全文
posted @ 2017-04-23 22:15 Candy? 阅读(444) 评论(0) 推荐(0) 编辑