[top]Unsolved
摘要:Data Structure:1.447 DIV2 Dhttp://codeforces.com/contest/447/problem/D2.447 DIV2 Ehttp://codeforces.com/contest/447/problem/EMath:1.450 DIV2 Ehttp://c...
阅读全文
posted @
2014-07-27 10:31
Gemmeg
阅读(161)
推荐(0)
UESTC 2014 Summer Training #10 Div.2
摘要:B.Race to 1UVA 11762 第一次接触概率dp,完全没想到是dp...没想到能递推出来0 0 首先需要知道 总的期望=每件事的期望×每件事发生的概率 然后可以根据这个来写递推公式,也是dp? 假设不小于x的质数有m个,x的质因子有n个(种 更确切),那么在求X的期望时,可以考虑...
阅读全文
posted @
2014-07-27 10:30
Gemmeg
阅读(231)
推荐(0)
UESTC 2014 Summer Training #11 Div.2
摘要:E -Prototype ZOJ 3235 把(d2,0)代入第二个方程可以得到一个方程:经过(d2,0)的抛物线的起点的方程 再把它和第一个方程联立,就能解出两条抛物线的交点,再验算:是否在0~d2范围内,是否在x=d1时会撞到building2 注意可能不需要滑行就能到达(d2,0),先...
阅读全文
posted @
2014-07-27 09:47
Gemmeg
阅读(234)
推荐(0)
Codeforces Round #258
摘要:A.Game With Sticks 就发现选定一个点之后,会删除相应的行列,即n-1,m-1,所以只需要看min(n,m)是基是偶#include #include #include using namespace std;int n, m;int main(){#ifdef LOCAL ...
阅读全文
posted @
2014-07-26 10:52
Gemmeg
阅读(147)
推荐(0)
Codeforces Round #257 (Div. 2)
摘要:A.Jzzhu and Children 计算每个人会出现的轮次数,取最后一个且轮次数最大的,注意是用a[i]-1 % m,倒着扫一遍就行了#include #include #include using namespace std;const int maxn = 100+10;int n, m...
阅读全文
posted @
2014-07-25 14:34
Gemmeg
阅读(169)
推荐(0)
UESTC 2014 Summer Training #7 Div.2
摘要:DAY7一开始状态还行,最高纪录rank7,然后没力气了,一直跌到rank24,问题还是很多呐。昨天总结的问题依然很大。Problem A UVA 12377 就一开始还是慌了,没审清楚题意就去WA了一发。 大意是给你一个数字表示的字符串,最高20位,第一表示有N个质数,后面是其幂的非降序...
阅读全文
posted @
2014-07-23 11:04
Gemmeg
阅读(210)
推荐(0)
UESTC 2014 Summer Training #6 Div.2
摘要:又是只过两水题,不过状态有些回升,也是差点一血.Problem A SPOJ AMR11A 显然的dp?就一抖就想到尝试从(R,C)推到(1,1),正着推的话,只能检查某一种解可不可行(就有人想出了二分+DP的神奇方法。。刚卡过。。不过上界是把所有龙加起来。。不闲麻烦的话。。可以按照贪心的方...
阅读全文
posted @
2014-07-21 00:43
Gemmeg
阅读(194)
推荐(0)
Codeforces Round #FF
摘要:A.DZY Loves Hash hash函数 h(x) = x % p 输出第一次冲突的位置#include#include#includeusing namespace std;const int maxn = 4000;int p, n;bool inhash[maxn];int ma...
阅读全文
posted @
2014-07-18 22:38
Gemmeg
阅读(182)
推荐(0)