- 博客(24)
- 资源 (1)
- 收藏
- 关注
原创 codefoces730C Bulmart 二分答案+贪心check && 堆维护
C. Bulmarttime limit per test1.5 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputA new trade empire is rising in Berland. Bulma
2017-08-29 10:57:45 660 1
原创 Codeforces Gym 101173 CERC 16 D & BZOJ 4790 Dancing Disks
Codeforces Gym 101173 CERC 16 D & BZOJ 4790 Dancing Disks强烈安利这道构造题目,非常有意思。这里用到的思想是归并排序!多路归并排序!我们这样想,假设6*6的网格中除了最后一个网格外,其他的凡是有元素的格子中,这些元素都是严格有序的。也就是说在每个rod上,从栈顶到栈底是严格单调递减的,那么我们可以模仿归并排序的
2017-08-25 12:00:15 315
原创 HDU2490 Parade 单调队列优化DP
ParadeTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1147 Accepted Submission(s): 529Problem DescriptionPanagola, The Lord o
2017-08-24 11:05:53 286
原创 HDU 2580 a simple stone game K倍减法博弈游戏
a simple stone gameTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 357 Accepted Submission(s): 253Problem DescriptionAfter he
2017-08-24 09:43:04 438
原创 HDU2485 Destroying the bus stations 迭代加深搜索
Destroying the bus stationsTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3140 Accepted Submission(s): 1045Problem Description
2017-08-24 09:01:45 260
原创 Query on a graph HDU5957 沈阳ICPC重现赛
Query on a graphTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 369 Accepted Submission(s): 81Problem DescriptionYou are give
2017-08-17 20:49:46 585
原创 Div1 小A抓小B tarjan双连通分量缩点+dfs
题目描述小A和小B在一个无向图G上进行一个游戏。图G是连通的,有n个点,n条边,无重边,无自环,结点编号为1~n。游戏开始前小A在结点x,小B在结点y(x≠y)。游戏开始后,小A和小B轮流进行移动(小A先移动),每次移动可以从当前结点移动到与当前结点相邻的某个结点。小A的目标是抓到小B(某一次移动之后小A与小B在同一个结点),小B的目标是不被小A抓到。两人都有图G的地图,并且知道对方在哪个结点
2017-08-17 10:15:52 180
原创 codeforces839D Winter is here 数论,莫比乌斯反演
D. Winter is heretime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWinter is here at the North and the White
2017-08-13 09:27:35 1044 3
原创 可持久化线段树&主席树、dfs序 Task Highways (aut)
HighwaysMemory limit: 128 MBByteland is a small country, with cities connected by bidirectional roads. From each city there is just one way of reaching every other city using the road
2017-08-12 12:16:12 374
原创 Summer Training day6 codeforces292D并查集合并
D. Connected Componentstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWe already know of the large corpor
2017-08-11 08:47:23 209
原创 Summer Training day6 codeforces 675D 二叉搜索树
D. Tree Constructiontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDuring the programming classes Vasya w
2017-08-11 08:38:36 216
原创 Summer Training day6 codeforces633G 线段树、bitset
G. Yash And Treestime limit per test4 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputYash loves playing with trees and gets es
2017-08-11 08:29:24 281
原创 Summer Training day6 codeforces 593D LCA+并查集
D. Happy Tree Partytime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBogdan has a birthday today and mom gav
2017-08-10 21:52:41 547
原创 Summer Training day6 codeforces343D dfs序、线段树
D. Water Treetime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMad scientist Mike has constructed a rooted t
2017-08-10 21:36:49 178
原创 Summer Training day6 codeforces787D 最短路spfa,线段树建图
D. Legacytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputRick and his co-workers have made a new radioacti
2017-08-10 21:27:52 502 1
原创 Summer Training day6 codeforces240F 线段树、回文串
F. TorCodertime limit per test3 secondsmemory limit per test256 megabytesinputinput.txtoutputoutput.txtA boy named Leo doesn't miss a single TorCoder contest ro
2017-08-10 21:14:14 234
原创 Summer Training day6 coseforces339D 线段树、位操作
D. Xenia and Bit Operationstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputXenia the beginner programmer h
2017-08-10 20:59:31 234
原创 Summer training day6 codeforces19E 树链剖分,并查集
E. Fairytime limit per test1.5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOnce upon a time there lived a good fairy A. One
2017-08-10 20:50:38 275
原创 Summer Training day4 cf439E 莫比乌斯反演
Today is Devu's birthday. For celebrating the occasion, he bought n sweets from the nearby market. He has invited his f friends. He would like to distribute the sweets among them. As he is a nice gu
2017-08-07 20:50:46 242
原创 Summer Training day4 Code hdu5212 莫比乌斯反演
WLD likes playing with codes.One day he is writing a function.Howerver,his computer breaks down because the function is too powerful.He is very sad.Can you help him? The function: int calc
2017-08-07 20:14:20 235
原创 Summer Training day4 Mod Tree 大步小步法求离散对数模板
The picture indicates a tree, every node has 2 children. The depth of the nodes whose color is blue is 3; the depth of the node whose color is pink is 0. Now out problem is so easy, give you a
2017-08-07 19:27:15 329
原创 Summer Training day4 Sumdiv
Consider two natural numbers A and B. Let S be the sum of all natural divisors of A^B. Determine S modulo 9901 (the rest of the division of S by 9901).InputThe only line contains the two natural
2017-08-07 19:23:22 141
原创 Summer Training day4上帝与集合的正确用法 欧拉函数+降幂公式
这个题的指数太大了,因此要考虑用降幂公式进行降幂记f(p) = 2^2^2... % pf(p) = 2^(2^2^2...%phi(p) + phi(p)) % p = 2^(f(phi(p)) + phi(p)) % p到这里我们得到了一个递推方程,边界f(1) = 0#include #include #include using namespace std;type
2017-08-07 19:11:47 224
原创 Summer Training day4 欧拉降幂
Input2Output2 Hint 1. For N = 2, S(1) = S(2) = 1.2. The input file consists of multiple test cases. Sample Input2Sample Output2
2017-08-07 19:04:36 548
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人