自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 hdu5195 线段树

http://acm.hdu.edu.cn/showproblem.php?pid=5195Problem DescriptionA topological sort or topological ordering of a directed graph is a linear ordering of its vertices such that for every d

2015-03-31 10:47:43 953

原创 hdu4403 暴力搜索

http://acm.hdu.edu.cn/showproblem.php?pid=4403Problem DescriptionAoshu is very popular among primary school students. It is mathematics, but much harder than ordinary mathematics for pri

2015-03-29 11:54:02 931

原创 hdu4400 STL应用 查找思维题

http://acm.hdu.edu.cn/showproblem.php?pid=4400Problem DescriptionTerrorists put some mines in a crowded square recently. The police evacuate all people in time before any mine explodes. Now

2015-03-29 11:46:16 889

原创 hdu4283 区间dp

http://acm.hdu.edu.cn/showproblem.php?pid=4283Problem Description  The TV shows such as You Are the One has been very popular. In order to meet the need of boys who are still single, TJU

2015-03-27 10:34:13 1174

原创 hdu4284 状态压缩dp

http://acm.hdu.edu.cn/showproblem.php?pid=4284Problem Description  PP loves travel. Her dream is to travel around country A which consists of N cities and M roads connecting them. PP has mea

2015-03-26 21:34:27 697

原创 hdu4280 网络流+挂(无向图的网络流注意建边)

http://acm.hdu.edu.cn/showproblem.php?pid=4280Problem Description  In the vast waters far far away, there are many islands. People are living on the islands, and all the transport among the

2015-03-24 11:51:36 2405

原创 hdu 4274 树形dp

http://acm.hdu.edu.cn/showproblem.php?pid=4274Problem DescriptionI'm a manager of a large trading company, called ACM, and responsible for the market research. Recently, another trading comp

2015-03-23 15:03:46 798

原创 hdu4277 dfs+set判重

http://acm.hdu.edu.cn/showproblem.php?pid=4277Problem DescriptionLike everyone, cows enjoy variety. Their current fancy is new shapes for pastures. The old rectangular shapes are out of

2015-03-22 19:30:13 1379 2

原创 hdu4268 multiset应用 贪心

http://acm.hdu.edu.cn/showproblem.php?pid=4268Problem DescriptionAlice and Bob's game never ends. Today, they introduce a new game. In this game, both of them have N different rectangular ca

2015-03-21 11:00:21 1048

原创 hdu4267分组线段树

http://acm.hdu.edu.cn/showproblem.php?pid=4267Problem DescriptionLet A1, A2, ... , AN be N elements. You need to deal with two kinds of operations. One type of operation is to add a give

2015-03-21 09:30:10 908

原创 poj1189 简单dp

http://poj.org/problem?id=1189Description有一个三角形木板,竖直立放,上面钉着n(n+1)/2颗钉子,还有(n+1)个格子(当n=5时如图1)。每颗钉子和周围的钉子的距离都等于d,每个格子的宽度也都等于d,且除了最左端和最右端的格子外每个格子都正对着最下面一排钉子的间隙。 让一个直径略小于d的小球中心正对着最上面的钉子在板上自由滚落,小球

2015-03-20 11:03:18 828

原创 poj1664 dp记忆化搜索

http://poj.org/problem?id=1664Description把M个同样的苹果放在N个同样的盘子里,允许有的盘子空着不放,问共有多少种不同的分法?(用K表示)5,1,1和1,5,1 是同一种分法。Input第一行是测试数据的数目t(0 Output对输入的每组数据M和N,用一行输出相应的K。Sample Input17 3

2015-03-20 09:12:42 712

原创 CF 527C STL set和multiset 典型应用

http://codeforces.com/problemset/problem/527/CC. Glass Carvingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outp

2015-03-19 20:52:01 899

原创 CF 527B 思维题

http://codeforces.com/problemset/problem/527/BB. Error Correct Systemtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstanda

2015-03-19 16:48:53 1792

原创 poj1742 多重背包的可行性问题

http://poj.org/problem?id=1742DescriptionPeople in Silverland use coins.They have coins of value A1,A2,A3...An Silverland dollar.One day Tony opened his money-box and found there were some coi

2015-03-18 21:17:39 3484 1

原创 poj1191 分治思想,记忆化搜索

http://poj.org/problem?id=1191Description将一个8*8的棋盘进行如下分割:将原棋盘割下一块矩形棋盘并使剩下部分也是矩形,再将剩下的部分继续如此分割,这样割了(n-1)次后,连同最后剩下的矩形棋盘共有n块矩形棋盘。(每次切割都只能沿着棋盘格子的边进行) 原棋盘上每一格有一个分值,一块矩形棋盘的总分为其所含各格分值之和。现在需要把棋盘

2015-03-18 16:27:01 1898

原创 poj1179 区间dp(记忆化搜索写法)有巨坑!

http://poj.org/problem?id=1179DescriptionPolygon is a game for one player that starts on a polygon with N vertices, like the one in Figure 1, where N=4. Each vertex is labelled with an integer

2015-03-18 11:38:55 1546

原创 hdu5188 加限制的01背包问题

http://acm.hdu.edu.cn/showproblem.php?pid=5188Problem DescriptionAs one of the most powerful brushes in the world, zhx usually takes part in all kinds of contests.One day, zhx takes pa

2015-03-16 20:39:14 2231

原创 poj1178 floyd+枚举

http://poj.org/problem?id=1178DescriptionCenturies ago, King Arthur and the Knights of the Round Table used to meet every year on New Year's Day to celebrate their fellowship. In remembrance o

2015-03-16 16:29:51 1072

原创 hdu 5187 快速幂快速乘法

http://acm.hdu.edu.cn/showproblem.php?pid=5187Problem DescriptionAs one of the most powerful brushes, zhx is required to give his juniors n problems.zhx thinks the ith problem's difficul

2015-03-15 11:44:27 1254

原创 hdu1143 状态压缩dp 记忆化搜索写法

http://poj.org/problem?id=1143DescriptionChristine and Matt are playing an exciting game they just invented: the Number Game. The rules of this game are as follows. The players take turns ch

2015-03-14 10:07:19 854

原创 poj1083 思维题

http://poj.org/problem?id=1083DescriptionThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms

2015-03-12 21:36:50 3506

原创 NEFUOJ 500 二分+最大流

http://acm.nefu.edu.cn/JudgeOnline/problemshow.php?problem_id=500description 在这个信息化的时代,网购成为了最流行的购物方式,比起在大街上,顶着烈日寻找需要的商品,大多数人更愿意坐在家里,点击下鼠标,来找到喜欢的商品,并完成购物。尽管网购还有很多安全问题,但是接受网购的

2015-03-12 20:20:11 1705 9

原创 hdu5183 hush

http://acm.hdu.edu.cn/showproblem.php?pid=5183Problem DescriptionWhen given an array (a0,a1,a2,⋯an−1) and an integer K, you are expected to judge whether there is a pair (i,j)(0≤i≤jn) wh

2015-03-11 22:49:51 1162

原创 zoj3460

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3460MissileTime Limit: 2 Seconds      Memory Limit: 65536 KBYou control N missile launching towers. Every tower has enough mi

2015-03-11 22:47:42 707

原创 hdu3829 二分图的最大独立集

http://acm.hdu.edu.cn/showproblem.php?pid=3829Cat VS DogTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 125536/65536 K (Java/Others)Total Submission(s): 2851    Accepted Submission(s

2015-03-10 20:40:34 919

原创 poj2771 二分图的最大独立集

http://poj.org/problem?id=2771DescriptionFrank N. Stein is a very conservative high-school teacher. He wants to take some of his students on an excursion, but he is afraid that some of them mi

2015-03-10 16:41:28 1245

原创 poj2195 二分图的最佳匹配

http://poj.org/problem?id=2195DescriptionOn a grid map there are n little men and n houses. In each unit time, every little man can move one unit step, either horizontally, or vertically, to a

2015-03-10 09:47:33 678

原创 hdu1151 最小路径覆盖

http://acm.hdu.edu.cn/showproblem.php?pid=1151Problem DescriptionConsider a town where all the streets are one-way and each street leads from one intersection to another. It is also know

2015-03-09 20:42:36 1446

原创 hdu4751 二分图的判断

http://acm.hdu.edu.cn/showproblem.php?pid=4751Problem Description  This year is the 60th anniversary of NJUST, and to make the celebration more colorful, Tom200 is going to invite distin

2015-03-09 19:19:40 1187 3

原创 hdu1045 暴力搜索,用二分图也可以做

http://acm.hdu.edu.cn/showproblem.php?pid=1045Problem DescriptionSuppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each r

2015-03-04 22:07:17 695

原创 hdu2444 二分图的匹配,先判断是否为二分图

http://acm.hdu.edu.cn/showproblem.php?pid=2444Problem DescriptionThere are a group of students. Some of them may know each other, while others don't. For example, A and B know each other, B

2015-03-04 10:26:46 1000

原创 hdu4612 连通性,求树的直径,加一边求最少桥

http://acm.hdu.edu.cn/showproblem.php?pid=4612Problem Description  N planets are connected by M bidirectional channels that allow instant transportation. It's always possible to travel b

2015-03-03 17:06:58 1657

原创 hdu4587 求割点变形

http://acm.hdu.edu.cn/showproblem.php?pid=4587Problem DescriptionSuppose that G is an undirected graph, and the value of stab is defined as follows:Among the expression,G-i, -j is the

2015-03-02 21:58:46 1024

原创 CF 295div2 B dp(记忆化搜索)

http://codeforces.com/contest/520/problem/BB. Two Buttonstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard

2015-03-02 18:53:05 1381

原创 hdu2460&&poj3694 缩点+lca变形

http://acm.hdu.edu.cn/showproblem.php?pid=2460http://poj.org/problem?id=3694Problem DescriptionA network administrator manages a large network. The network consists of N computers and M

2015-03-02 11:58:35 809

原创 LCA最近公共祖先 在线算法和离线算法 模板

原理讲解:http://dongxicheng.org/structure/lca-rmq/在线算法模板:/**LCA在线算法O(nlogn)主函数调用:init();tot=0,dir[1]=0;dfs(1,1);ST(2*n-1);int lca=LCA(u,v);*/#include #include #include #include #inclu

2015-03-01 17:23:53 1312

原创 hdu 2586 LCA模板题(离线和在线两种解法)

http://acm.hdu.edu.cn/showproblem.php?pid=2586Problem DescriptionThere are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this

2015-03-01 10:51:36 4421

空空如也

空空如也

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

TA关注的人

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