hdu补题
invariance
这个作者很懒,什么都没留下…
展开
-
树链剖分简介及补题1
先简单介绍一下树链剖分; 树链剖分可以看成对树的预处理,对不同结构的树的所有节点用标号tid【i】表示,求解一个特殊标号tid【i】使得用这一组特殊标号对应到的相应的数据结构后对查询和修改的复杂度都优化为logn^2的级别的过程即可叫做对树的剖分。。一般的是用启发式数剖的方法求解tid【i】,即定义重儿子,轻儿子,重链,轻链相应概念,按照一遍dfs求出每个点的重儿子(没有儿子的默认为0),原创 2017-09-24 20:54:53 · 181 阅读 · 0 评论 -
hdu2017青岛网络赛Pythagoras(Tree of primitive Pythagorean triples)
题面: Given a list of integers a0,a1,a2,⋯,a2k−1. Pythagoras triples over 109 are all solutions of x2+y2=z2 where x,y and z are constrained to be positive integers less than or equal to原创 2017-10-14 15:20:03 · 485 阅读 · 0 评论 -
hdu2017青岛网络赛(The Intersection)(数学特殊二分题)
题面: A given coefficient K leads an intersection of two curves f(x) and gK(x). In the first quadrant, the curve f is a monotone increasing function that f(x)=x√. The curve g is decreasin原创 2017-10-12 20:41:43 · 402 阅读 · 0 评论 -
hdu2017青岛网络赛The Dominator of Strings(ac自动机练习题)
我们已经介绍过ac自动机是什么(http://blog.csdn.net/invariance/article/details/78186894); 题面: Here you have a set of strings. A dominator is a string of the set dominating all strings else. The string S is do原创 2017-10-11 15:01:33 · 274 阅读 · 0 评论 -
2017hdu沈阳网络赛补题triangulation
留坑。 参考了tls的题解大概知道怎么做。。。但估计不好写,同时还有一些细节不好处理。。。大概就是根据正多边形的特征可以把所有三角剖分后的三角形面积用两边跨越的多边形边数(a,b)表示为1/2*(sin(2aπ/n)+sin(2bπ/n)-sin(2(a+b)π/n));然后暴力枚举所有面积求当其为最大面积时有多少种方案。。。留到以后对计算几何有点掌握后再回来补。。。原创 2017-10-06 09:00:07 · 248 阅读 · 0 评论 -
2017沈阳网络赛ping (树链剖分+树状数组)
标准对树进行树链剖分,并用树状数组维护连续区间和问题。树状数组维护两点u,v对应的【tid【u】,tid【v】】区间是否有点已经被破坏。 代码: #include #include #include #include using namespace std; #define n 10005 const int maxn=50000+5; vectorp[n]; in原创 2017-10-05 11:43:56 · 203 阅读 · 0 评论 -
hdu2017沈阳网络赛(2)transaction(从最短路到树dp)
题面: Kelukin is a businessman. Every day, he travels around cities to do some business. On August 17th, in memory of a great man, citizens will read a book named "the Man Who Changed China". Of cour原创 2017-10-03 16:21:26 · 306 阅读 · 0 评论 -
hdu2017青岛网络赛Apple(java练习题)
。。。。没啥好说的。。。。比赛的时候没想到用java做。。。。 代码: import java.math.BigDecimal; import java.util.Scanner; public class Main { public static void main(String[]args){ Scanner read=new Scanner(System.in);原创 2017-10-07 21:51:52 · 216 阅读 · 0 评论 -
hdu2017沈阳网络赛card(结论水题)
题面: As a fan of Doudizhu, WYJ likes collecting playing cards very much. One day, MJF takes a stack of cards and talks to him: let's play a game and if you win, you can get all these cards. MJF rand原创 2017-10-06 20:59:09 · 363 阅读 · 0 评论 -
hdu2017沈阳网络赛补题(一)mustedge mustedge(数剖求lca+树状数组)
正式准备非常に写题前,先立个flag,倒过来写hdu(笑~)先是最后一页的第一题(大笑~)mustedge mustedge(这题的求解受到https://post.icpc-camp.org/d/724-hdoj-6200-mustedge-mustedge-mustedge的启发) 以及可以看http://blog.csdn.net/luotuoqingshan/article/detail原创 2017-09-27 21:14:17 · 290 阅读 · 0 评论 -
hdu2017青岛网络赛Zuma(区间dp)
题面: Think about the Zuma Game. You have a row of at most 200 black(0) or white(1) balls on the table at the start. Each three consecutive balls never share the same colour. You also have infini原创 2017-10-15 16:03:26 · 387 阅读 · 0 评论