摘要:嗯本来想着直接算出来不就行了吗 然后我想到了200^200^200....... 好吧其实也不难取两次log就行了 然后我第一次写出来log就写残了........... log里面的拆分要仔细啊... 果然涉及到log就容易出问题 一组小于等于1的数据直接就跪了= = 不过我猜跪在这组数据的人应该
阅读全文
摘要:题意: 不概括了..太长了.. 额第一次做这种问题 算是概率dp吗? 保存前缀项中第一个和最后一个的概率 然后每添加新的一项 就解除前缀和第一项和最后一项的关系 并添加新的一项和保存的两项的关系 这里关系指的是两者相邻会产生的额外收入(其中一个满足条件就能得到 因此公式是 2000 * (rate[
阅读全文
摘要:题意:处在同一对角线上的主教(是这么翻译没错吧= =)会相互攻击 求互相攻击对数 由于有正负对角线 因此用两个数组分别保存每个主教写的 x-y 和 x+y 然后每个数组中扫描重复数字k ans加上kC2就行了 wa了两发的原因是没考虑到如果整个数组都是重复的 那要最后额外加一次 #include <
阅读全文
摘要:题意是得到最大的偶数和 解决办法很简单 排个序 取和 如果是奇数就减去最小的奇数 #include <cstdio> #include <cmath> #include <cstring> #include <queue> #include <vector> #include <algorithm>
阅读全文
摘要:Peter got a new snow blower as a New Year present. Of course, Peter decided to try it immediately. After reading the instructions he realized that it ...
阅读全文
摘要:It's the year 4527 and the tanks game that we all know and love still exists. There also exists Great Gena's code, written in 2016. The problem this c...
阅读全文
摘要:第一次正式参加常规赛想想有些小激动的呢然后第一题就被hack了 心痛_(:зゝ∠)_tle点在于越界 因此结束循环条件从乘变为除 done//等等 这题没过总评 让我静静........//改天再来改吧.......#include int main(){ long long l, r, k;...
阅读全文