自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(758)
  • 收藏
  • 关注

原创 poj 1679 次小生成树

http://poj.org/problem?id=1679DescriptionGiven a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree): Consider a connected, undirected gra

2015-07-13 11:42:11 905

原创 CF555B 贪心

http://codeforces.com/problemset/problem/555/BB. Case of Fugitivetime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard o

2015-07-12 09:43:01 873

原创 poj1737 组合dp

http://poj.org/problem?id=1737DescriptionAn undirected graph is a set V of vertices and a set of E∈{V*V} edges.An undirected graph is connected if and only if for every pair (u,v) of vertices,

2015-07-10 21:08:46 1235

原创 CF3C 暴力

http://codeforces.com/problemset/problem/3/CC. Tic-tac-toetime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard

2015-07-10 11:59:48 870

原创 CF3B 贪心

http://codeforces.com/problemset/problem/3/BA group of tourists is going to kayak and catamaran tour. A rented lorry has arrived to the boat depot to take kayaks and catamarans to th

2015-07-09 21:34:15 917

原创 hdu 4057 AC自动机+状态压缩dp

http://acm.hdu.edu.cn/showproblem.php?pid=4057Problem DescriptionDr. X is a biologist, who likes rabbits very much and can do everything for them. 2012 is coming, and Dr. X wants to take som

2015-07-08 11:51:52 1027

原创 hdu4055 dp

http://acm.hdu.edu.cn/showproblem.php?pid=4055Problem DescriptionThe signature of a permutation is a string that is computed as follows: for each pair of consecutive elements of the permutat

2015-07-07 20:25:18 1994 1

原创 UVALive 6665 最短路

http://acm.hust.edu.cn/vjudge/contest/view.action?cid=81769#problem/E/**UVALive 6665 最短路题目大意:给定一个3*3的棋盘,里面有8个现有的棋子,然后移动棋子,从初始状态到目标状态最少花费是多少?解题思路:这个题用bfs+康托展开写的结果超时,后来从网上学了一个最短路的写法,速度很快。每种状态压缩成一个

2015-07-05 12:17:09 797

原创 hdu4455 dp

http://acm.hdu.edu.cn/showproblem.php?pid=4455SubstringsTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2229    Accepted Submission(s

2015-07-04 15:28:44 1518

原创 CF 553A 组合DP

http://codeforces.com/problemset/problem/553/AA. Kyoya and Colored Ballstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputsta

2015-06-28 10:21:00 1749

原创 CF552E 字符串 表达式求值

http://codeforces.com/contest/552/problem/EE. Vanya and Bracketstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard out

2015-06-27 16:38:33 1399

原创 CF 552C 进制转换

http://codeforces.com/problemset/problem/552/CC. Vanya and Scalestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputs

2015-06-27 11:37:55 1271

原创 UVA LA 7146 2014上海亚洲赛(贪心)

https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=648&problem=5158&mosmsg=Submission+received+with+ID+1708713/**UVA LA 7146 2014上海亚洲赛(贪心)题目大

2015-06-09 10:29:22 803

原创 CF149D 区间dp

http://codeforces.com/problemset/problem/149/DD. Coloring Bracketstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard

2015-06-08 17:05:43 1249

原创 poj 1741 楼教主男人八题之一:树分治

http://poj.org/problem?id=1741DescriptionGive a tree with n vertices,each edge has a length(positive integer less than 1001). Define dist(u,v)=The min distance between node u and v. Give a

2015-06-05 12:06:17 1567 1

原创 hdu 3709 数位dp(小思维)

http://acm.hdu.edu.cn/showproblem.php?pid=3709Problem DescriptionA balanced number is a non-negative integer that can be balanced if a pivot is placed at some digit. More specifically, imagi

2015-06-04 07:41:10 980

原创 hdu 4507 数位dp(求和,求平方和)

http://acm.hdu.edu.cn/showproblem.php?pid=4507Problem Description  单身!  依然单身!  吉哥依然单身!  DS级码农吉哥依然单身!  所以,他生平最恨情人节,不管是214还是77,他都讨厌!    吉哥观察了214和77这两个数,发现:  2+1+4=7  7+7=7*2 

2015-06-03 17:37:59 2702

原创 hdu 5242 树链剖分找权值最大的前k条链

http://acm.hdu.edu.cn/showproblem.php?pid=5242Problem DescriptionIt is well known that Keima Katsuragi is The Capturing God because of his exceptional skills and experience in ''capturing''

2015-06-01 09:02:30 1602

原创 HYSBZ 2243 树链剖分(区间更新,区间查询)较难

http://www.lydsy.com/JudgeOnline/problem.php?id=2243Description给定一棵有n个节点的无根树和m个操作,操作有2类:1、将节点a到节点b路径上所有点都染成颜色c;2、询问节点a到节点b路径上的颜色段数量(连续相同颜色被认为是同一段),如“112221”由3段组成:“11”、“222”和“1”。

2015-05-30 08:35:39 1151 3

原创 poj 3237 树链剖分(区间更新,区间查询)

http://poj.org/problem?id=3237DescriptionYou are given a tree with N nodes. The tree’s nodes are numbered 1 through N and its edges are numbered 1 through N − 1. Each edge is associated with a

2015-05-29 16:25:04 1311

原创 light oj 1348 树链剖分(单点更新区间求值)

http://lightoj.com/volume_showproblem.php?problem=1348Finally the Great Magical Lamp was in Aladdin's hand. Now he wanted to return home. But he didn't want to take any help from the Genie because

2015-05-29 14:19:15 1056

原创 HYSBZ 1036 树链剖分(单点更新区间求和求最大值)

http://www.lydsy.com/JudgeOnline/problem.php?id=1036Description一棵树上有n个节点,编号分别为1到n,每个节点都有一个权值w。我们将以下面的形式来要求你对这棵树完成一些操作: I. CHANGE u t : 把结点u的权值改为t II. QMAX u v: 询问从点u到点v的路径上的节点的最大权值 III. QSUM u

2015-05-29 13:14:05 996

原创 FZU2082 树链剖分(单点更新区间求值)

http://acm.fzu.edu.cn/problem.php?pid=2082 Problem Description有n座城市,由n-1条路相连通,使得任意两座城市之间可达。每条路有过路费,要交过路费才能通过。每条路的过路费经常会更新,现问你,当前情况下,从城市a到城市b最少要花多少过路费。 Input有多组样例,每组样例第一行输入两个正整数n,m(2

2015-05-29 13:08:36 808

原创 poj 2763 树链剖分(单点更新,区间求值)

http://poj.org/problem?id=2763DescriptionAfter their royal wedding, Jiajia and Wind hid away in XX Village, to enjoy their ordinary happy life. People in XX Village lived in beautiful huts. Th

2015-05-28 20:19:35 778

原创 hdu3966 树链剖分(区间更新和单点求值)

http://acm.hdu.edu.cn/showproblem.php?pid=3966Problem DescriptionOur protagonist is the handsome human prince Aragorn comes from The Lord of the Rings. One day Aragorn finds a lot of enemies

2015-05-28 10:30:28 1678

原创 spoj375 树链剖分(单点更新,区间查询)

http://www.spoj.com/problems/QTREE/QTREE - Query on a treeno tags You are given a tree (an acyclic undirected connected graph) with N nodes, and edges numbered 1, 2, 3...N-1.We w

2015-05-27 10:17:39 919

原创 hdu4751 最短路+背包dp

http://acm.hdu.edu.cn/showproblem.php?pid=4571Problem Description  Bob gets tired of playing games, leaves Alice, and travels to Changsha alone. Yuelu Mountain, Orange Island, Window of

2015-05-21 19:26:53 831

原创 hdu 1829 并查集(食物链的弱化版)

http://acm.hdu.edu.cn/showproblem.php?pid=1829Problem DescriptionBackground Professor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two

2015-05-19 20:00:29 960

原创 hdu 4568 spfa 最短路算法+旅行商问题

http://acm.hdu.edu.cn/showproblem.php?pid=4568Problem Description  One day, a hunter named James went to a mysterious area to find the treasures. James wanted to research the area and brough

2015-05-19 15:35:43 1861

原创 Timus OJ 1057 数位dp

http://acm.timus.ru/problem.aspx?space=1&num=10571057. Amount of DegreesTime limit: 1.0 secondMemory limit: 64 MBCreate a code to determine the amount of integers, lying in the set

2015-05-18 20:46:47 934

原创 poj3017 dp+单调队列

http://poj.org/problem?id=3017DescriptionGiven an integer sequence { an } of length N, you are to cut the sequence into several parts every one of which is a consecutive subsequence of the ori

2015-05-18 14:52:45 1010 1

原创 hdu5093 二分图的最大匹配

http://acm.hdu.edu.cn/showproblem.php?pid=5093Problem DescriptionDear contestant, now you are an excellent navy commander, who is responsible of a tough mission currently.Your fleet unfo

2015-05-13 08:56:29 1025

原创 hdu5094 状态压缩+bfs

http://acm.hdu.edu.cn/showproblem.php?pid=5094Problem DescriptionThis story happened on the background of Star Trek.Spock, the deputy captain of Starship Enterprise, fell into Klingo

2015-05-13 08:47:03 1731

原创 高精度加法乘法类

/**如何用:1、变量声明:可以给初值,如:BigInt ans=100; 可以补给初值(默认为0),如BigInt ans;2、计算:可以连个BigInt对象相乘,相加;ans+ans*ans; 也可以和整数相乘相加,如:ans+78*ans;*/struct BigInt { const static int mod=100

2015-05-10 21:31:19 977

原创 ACdreamOJ 1726 hash

http://acdream.info/problem?pid=1726Problem DescriptionRecently, Losanto find an interesting Math game. The rule is simple: Tell you a number H, and you can choose some numbers from a set {a

2015-05-10 10:34:43 863

原创 hdu5222 拓扑+并查集

http://acm.hdu.edu.cn/showproblem.php?pid=5222Problem DescriptionMiceren likes exploration and he found a huge labyrinth underground! This labyrinth has N caves and some tunnels connec

2015-05-09 21:52:08 1082

原创 hdu2457AC自动机+DP

http://acm.hdu.edu.cn/showproblem.php?pid=2457Problem DescriptionBiologists finally invent techniques of repairing DNA that contains segments causing kinds of inherited diseases. For the

2015-05-04 19:59:41 742

原创 hdu2296 AC自动机+DP

http://acm.hdu.edu.cn/showproblem.php?pid=2296Problem DescriptionFor the hope of a forever love, Steven is planning to send a ring to Jane with a romantic string engraved on. The string's le

2015-05-04 14:40:58 759

原创 hdu4758AC自动机+状态压缩DP

http://acm.hdu.edu.cn/showproblem.php?pid=4758Problem Description  On the beaming day of 60th anniversary of NJUST, as a military college which was Second Artillery Academy of Harbin Mil

2015-05-04 08:45:12 809

原创 hdu2825 AC自动机+状态压缩DP

http://acm.hdu.edu.cn/showproblem.php?pid=2825Problem DescriptionLiyuan lives in a old apartment. One day, he suddenly found that there was a wireless network in the building. Liyuan did not

2015-05-03 21:14:08 576

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除