随笔分类 - 数据结构
摘要:宿命的PSS 思路: 考虑克鲁斯卡尔算法,每次我们选取最小的边,并且这条要连接两个联通块,那么记联通块$1$有$x$个点,联通块$2$有$y$个点,则其他除了当前边其他的$x y 1$条边的大小必定是这条最小边的长度$+1$ [题链][1] 代码: [1]: https://vijos.org/p/
阅读全文
摘要:线索二叉树 节点 构造 求中序二叉树的第一个节点 求中序线索二叉树中节点p的后继节点
阅读全文
摘要:K th Number [此处输入链接的描述][1] [1]: http://poj.org/problem?id=2104 题意 给定一个序列$a1,a2,a3...,an$,和m个三元组表示的查询.对于每个查询$(i,j,k)$,输出$ai,ai+1,...aj$的升序排列中的第$k$个数。 思
阅读全文
摘要:Array Division [题目链接][1] [1]: http://codeforces.com/contest/808/problem/D 题意 n个数,然后你可以移动里面的一个数,然后再将序列分成两段,问是否可能这两段的和相同。 思路 先求出序列的前缀和,然后枚举移动哪个,要么放在当前序列
阅读全文
摘要:ORDERS Ordering the Soldiers As you are probably well aware, in Byteland it is always the military officer's main worry to order his soldiers on parad
阅读全文
摘要:B. The Meeting Place Cannot Be Changed time limit per test 5 seconds memory limit per test 256 megabytes input standard input output standard output B
阅读全文
摘要:Counting Offspring Time Limit: 15000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2759 Accepted Submission(s):
阅读全文
摘要:D. Water Tree time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output D. Water Tree time limit p
阅读全文
摘要:Apple Tree Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 28060 Accepted: 8343 Description There is an apple tree outside of kaka's house.
阅读全文
摘要:C. Propagating tree time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Iahub likes trees ve
阅读全文
摘要:Lotus and Horticulture Accepts: 91 Submissions: 641 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Lotus and Horti
阅读全文
摘要:C. Hongcow Builds A Nation time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Hongcow is ru
阅读全文
摘要:ZYB loves Xor I Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 917 Accepted Submission(s): 424 P
阅读全文
摘要:Exploration Accepts: 190 Submissions: 976 Time Limit: 30000/15000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Exploration Accepts: 19
阅读全文
摘要:Sum Of Gcd Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 738 Accepted Submission(s): 333 Probl
阅读全文
摘要:NPY and girls Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1155 Accepted Submission(s): 401 Pr
阅读全文
摘要:Interviewe Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6689 Accepted Submission(s): 1582 Prob
阅读全文
摘要:Cornfields Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 6798 Accepted: 3315 Description FJ has decided to grow his own corn hybrid in or
阅读全文
摘要:C. Watching Fireworks is Fun time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output C. Watching
阅读全文
摘要:Fence Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 4705 Accepted: 1489 Description A team of k (1 <= K <= 100) workers should paint a fe
阅读全文