摘要: SumdivTime Limit:1000MSMemory Limit:30000KTotal Submissions:17039Accepted:4280DescriptionConsider two natural... 阅读全文
posted @ 2015-12-09 22:53 chenhuan001 阅读(363) 评论(0) 推荐(0) 编辑
摘要: 1.扩展欧几里得求逆元typedef long long ll;//ax + by = gcd(a,b)//传入固定值a,b.放回 d=gcd(a,b), x , yvoid extendgcd(ll a,ll b,ll &d,ll &x,ll &y){ if(b==0){d=a;x=1;y=... 阅读全文
posted @ 2015-12-09 22:33 chenhuan001 阅读(382) 评论(0) 推荐(0) 编辑
摘要: 1.无成段更新 2.成段更新 (区间替换) 3.(区间增减)o(╯□╰)o 两行代码的差别。 阅读全文
posted @ 2015-12-09 15:10 chenhuan001 阅读(189) 评论(1) 推荐(0) 编辑
摘要: ZYB's Biology简单题,直接判断替换,然后判断即可。#include #include #include #include #include #include using namespace std;char s[110],t[119];int chgs(char c){ if(c=... 阅读全文
posted @ 2015-12-09 14:54 chenhuan001 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 这次题目挺有意思的,可惜D题差几分钟没交对。E题的博弈还是很基础的SG函数,让我复习了下博弈。A - Uncowed Forces基本的输入输出,一个公式输出来即可,但是要注意的是,写之前先化简变成全为整数的情况。#include #include using namespace std;int m... 阅读全文
posted @ 2015-12-09 10:18 chenhuan001 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 转自:Sprague-Grundy Function-SG函数--博弈论(3)公平游戏的Sprague-Grundy定理公平游戏是一种双人游戏,在游戏中双方都有完整的信息,没有牵涉,任何状态的合法操作对双方来说都是相同的。一个公平游戏可以抽象地用一个有向无环图来表示,这个图中每个点都对应这一个状态,... 阅读全文
posted @ 2015-12-09 10:15 chenhuan001 阅读(1097) 评论(0) 推荐(0) 编辑