会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
thy's blog
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
7
8
9
10
11
12
13
14
15
···
19
下一页
2015年10月12日
bzoj2075[SDOI2012]Longge的问题
摘要: 传送门:http://www.lydsy.com:808/JudgeOnline/problem.php?id=2705 思路:首先要求的是Σgcd(i,n)(1#include#includeusing namespace std;typedef long long ll;ll n,ans;l...
阅读全文
posted @ 2015-10-12 09:17 orzpps
阅读(183)
评论(0)
推荐(0)
2015年10月11日
一道组合数取模题
摘要: 题目大意:求长度为n且每项均在[1,n]的不上升数列与不下降数列的个数和。 思路:总数就是不下降数列的个数*2-n(常数列的个数) 然后考虑不下降数列的个数 为了方便,把第0项设为0,把第n+1项设为n。 差分,然后不下降数列就是差分数组a[i]每一项大于等于0,且Σa[i]=n。 每项+1,就...
阅读全文
posted @ 2015-10-11 11:10 orzpps
阅读(156)
评论(0)
推荐(0)
bzoj1407: [Noi2002]Savage
摘要: 传送门:http://www.lydsy.com:808/JudgeOnline/problem.php?id=1407 思路:因为M#include#include#define abs(a) (a<0?-a:a)const int maxn=1000000;using namespace s...
阅读全文
posted @ 2015-10-11 10:44 orzpps
阅读(116)
评论(0)
推荐(0)
bzoj1477: 青蛙的约会
摘要: 传送门:http://www.lydsy.com:808/JudgeOnline/problem.php?id=1477 思路:扩展欧几里德求解同余方程。 设x步后碰面,初始位置为x0,y0。 那么就有x0+mx=y0+nx(mod L) (m-n)x=y0-x0(mod L) //程序里要先把...
阅读全文
posted @ 2015-10-11 10:32 orzpps
阅读(196)
评论(0)
推荐(0)
2015年9月25日
codeforces 580D Kefa and Dishes
摘要: 传送门:http://codeforces.com/problemset/problem/580/d 思路:状压DP,f[i][j]表示最后一个为i,已选取的菜的状态为j。 #include#include#includeconst int maxt=540000;using namesp...
阅读全文
posted @ 2015-09-25 11:40 orzpps
阅读(192)
评论(0)
推荐(0)
codeforces 573C. Bear and Drawing
摘要: 传送门:http://codeforces.com/problemset/problem/573/c 思路:见官方题解。。。 #include#include#include#includeconst int maxn=100010;using namespace std;int n,...
阅读全文
posted @ 2015-09-25 10:42 orzpps
阅读(285)
评论(0)
推荐(0)
2015年8月20日
bzoj2658: [Zjoi2012]小蓝的好友(mrx)
摘要: 传送门:http://www.lydsy.com:808/JudgeOnline/problem.php?id=2658 思路:显然答案=总矩形数-没有点的矩形数 然后可以考虑用扫描线,现在只计算边界在这条线上的举行书,对每个点记录一个高度h[i],表示这条线上的这个点能走多远。 因为数据随机,...
阅读全文
posted @ 2015-08-20 11:53 orzpps
阅读(176)
评论(0)
推荐(0)
bzoj1895: Pku3580 supermemo
摘要: 传送门:http://www.lydsy.com:808/JudgeOnline/problem.php?id=1895 思路:fhq_treap。 其他操作都好办,对于revolve操作其实就是交换两个区间而已,知道这一点就没有什么了。 (在bzoj srand(time(0))会0ms RE...
阅读全文
posted @ 2015-08-20 09:13 orzpps
阅读(133)
评论(0)
推荐(0)
2015年8月18日
uva10829 L-Gap Substrings
摘要: 传送门:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=20&page=show_problem&problem=1770 思路:这题和上一题SPOJ687的思路一样,也是枚举长度,再对...
阅读全文
posted @ 2015-08-18 15:31 orzpps
阅读(134)
评论(0)
推荐(0)
2015年8月17日
spoj687 REPEATS
摘要: 传送门:http://www.spoj.com/problems/REPEATS/ 思路:又是一道论文题。 论文上是这么说的 这题用到了枚举长度的方法,往后匹配我们只要看两个后缀的LCP即可,而往前匹配,一个显然的做法是把串反过来,接到后面看对应的后缀的LCP。实际上并不需要这样,我们只需要...
阅读全文
posted @ 2015-08-17 11:50 orzpps
阅读(414)
评论(0)
推荐(2)
上一页
1
···
7
8
9
10
11
12
13
14
15
···
19
下一页
公告