上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 28 下一页
摘要: T1 叕出锅了。。。 大意:求一个最小的数的阶乘是给定的n个数的乘积的倍数。 二分边界定小,WA了两个点。二分边界不要省啊。。。多不了多少时间。。。 cpp include include include using namespace std; const int N=100005; int n, 阅读全文
posted @ 2018-08-10 20:06 SWHsz 阅读(135) 评论(0) 推荐(0) 编辑
摘要: T1 博弈+dp,设f[i][j]表示第f个人报j是否有必胜策略。 分i+1是不是同类讨论即可。 cpp include include include include using namespace std; const int N=5005; int n,m,k; bool f[N=0;j ) 阅读全文
posted @ 2018-08-08 20:56 SWHsz 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 后两道题没交上去。。。md T1 dijkstra+求哈密顿路径的水题,没开long long挂了两个点。 cpp include include include include define int long long using namespace std; const int N=50005, 阅读全文
posted @ 2018-08-06 22:01 SWHsz 阅读(111) 评论(0) 推荐(0) 编辑
摘要: ~~21 世纪是生物学的世纪~~,以遗传与进化为代表的现代生物理论越来越多的 进入了我们的视野。 如同大家所熟知的,基因是遗传因子,它记录了生命的基本构造和性能。 因此生物进化与基因的变异息息相关,考察基因变异的途径对研究生物学有着 至关重要的作用。现在,让我们来看这样一个模型: 1、所有的基因都可 阅读全文
posted @ 2018-08-05 21:57 SWHsz 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Star 计划订购一本将要发行的周刊杂志,但他可不是为了读书,而是—— 集卡。 已知杂志将要发行 N 周(也就是 N 期),每期都会附赠一张卡片。Star 通 过种种途径,了解到 N 期杂志附赠的卡片种类。Star 只想订购连续的若干期, 并在这些期内收集所有可能出现的种类的卡片。现在他想知道,他最 阅读全文
posted @ 2018-08-05 21:52 SWHsz 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 一开始理解错题意,以为他俩速度一样,同时出发,结果发现样例也过不了。手玩一下样例,发现好像只要路径相交就行了如果路径有相交,说明有个LCA在另一条路径上,否则就有环了。然后树剖求个LCA。 cpp include include include using namespace std; const 阅读全文
posted @ 2018-08-03 09:45 SWHsz 阅读(112) 评论(0) 推荐(0) 编辑
摘要: ~~莫比乌斯反演???~~ 好像不用也行。 因为gcd(i,N)一定是N的因数,枚举N的每个因数,找一下有几个数和N的gcd是这个数就行了。那么这样的话(i/gcd,N/gcd)=1。求的东西就转化成: $\sum_{d|N} \phi(d) \cdot d$ 因为N太大了,所以枚举因子,边算$\p 阅读全文
posted @ 2018-08-01 11:07 SWHsz 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 和SCOI2010的连续攻击游戏基本一样。 cpp include include include using namespace std; int g[1005][1005],n,m,tim; int vis[1005],match[1005],anss[1005],ans; int dfs(in 阅读全文
posted @ 2018-08-01 11:01 SWHsz 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 枚举跑多少天,动态加边即可。 cpp include include include include using namespace std; const int N=1000005,inf=0x3f3f3f3f; int n,m,K,p[50],z[50],g[50][50],fa[50],ans 阅读全文
posted @ 2018-07-30 22:22 SWHsz 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 7月倒数第二天补flag 拆点,像深海机器人问题一样。最后求路线的时候dfs一下,根据流量判定走了几个机器人,不能超过流量即可。 cpp include include include include using namespace std; const int inf=0x3f3f3f3f,N=5 阅读全文
posted @ 2018-07-30 20:33 SWHsz 阅读(118) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 28 下一页