10 2017 档案

摘要:生命不息,学习不止,昨天学了两个算法,总结一下,然而只是略懂,请路过的大佬多多谅解。 一、dfs序 1、什么是dfs序? 其实完全可以从字面意义上理解,dfs序就是指一棵树被dfs时所经过的节点的顺序 原图来源于网络,并经过灵魂画师xhk的一发魔改。 好的,这张图的dfs序显然为A-B-D-E-G- 阅读全文
posted @ 2017-10-27 19:33 Styx-ferryman 阅读(20561) 评论(6) 推荐(33) 编辑
摘要:好吧,这名字真是让我想起了某段被某教科书支配的历史.....各种DP题层出不穷,不过终于做完了orz 虽然各种手糊加乱搞,但还是要总结一下. T1 Monkey Banana Problem 这道题和数塔问题差不多,不过多了一个倒过来的 代码如下: T2Rooks T3Marriage Ceremo 阅读全文
posted @ 2017-10-24 18:25 Styx-ferryman 阅读(1391) 评论(0) 推荐(1) 编辑
摘要:A lot of battleships of evil are arranged in a line before the battle. Our commander decides to use our secret weapon to eliminate the battleships. Ea 阅读全文
posted @ 2017-10-08 15:50 Styx-ferryman 阅读(248) 评论(0) 推荐(0) 编辑
摘要:Given a simple graph, output the number of simple cycles in it. A simple cycle is a cycle with no repeated vertices or edges. Input The first line of 阅读全文
posted @ 2017-10-08 15:23 Styx-ferryman 阅读(1219) 评论(0) 推荐(0) 编辑
摘要:For the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultim 阅读全文
posted @ 2017-10-07 20:59 Styx-ferryman 阅读(241) 评论(0) 推荐(0) 编辑
摘要:In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic 阅读全文
posted @ 2017-10-07 12:35 Styx-ferryman 阅读(211) 评论(0) 推荐(0) 编辑
摘要:我的线段树真的没救了......还是多练几道吧....... You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add s 阅读全文
posted @ 2017-10-06 19:49 Styx-ferryman 阅读(243) 评论(0) 推荐(0) 编辑
摘要:好久没打线段树,来一道练练手,但说句实话,I really hate it!!!! 很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位 阅读全文
posted @ 2017-10-06 15:46 Styx-ferryman 阅读(354) 评论(0) 推荐(0) 编辑
摘要:一些不会的算法,先记录,日后学习: splay(1/2) 莫比乌斯反演(1/2) 分块(莫队) 树上莫队(1/2) 点分治(1/2) 狄利克雷卷积 二维数点 dancing-link 主席树(1/2) 2-SAT(1/2) 01分数规划(1/2) 差分约束(1/2) 树链剖分(1/1) LCT (1 阅读全文
posted @ 2017-10-06 15:10 Styx-ferryman 阅读(7008) 评论(5) 推荐(2) 编辑