解题报告2
苏城yzw
这个作者很懒,什么都没留下…
展开
-
hdu 1874 畅通工程续 dij_最短路径
Problem Description 某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人很困扰。 现在,已知起点和终点,请你计算出要从起点到终点,最短需要行走多少距离。 Input 本题目包含多组数据,请处理到文件结束。原创 2014-07-21 09:37:29 · 448 阅读 · 0 评论 -
hdu 3001 Travelling 3进制状态压缩dp
Problem Description After coding so many days,Mr Acmer wants to have a good rest.So travelling is the best choice!He has decided to visit n cities(he insists on seeing all the cities!And he does not原创 2014-08-07 14:18:27 · 476 阅读 · 0 评论 -
hdu 胜利大逃亡(续) bfs+状态压缩 1429 钥匙与门相对应
Problem Description Ignatius再次被魔王抓走了(搞不懂他咋这么讨魔王喜欢)…… 这次魔王汲取了上次的教训,把Ignatius关在一个n*m的地牢里,并在地牢的某些地方安装了带锁的门,钥匙藏在地牢另外的某些地方。刚开始Ignatius被关在(sx,sy)的位置,离开地牢的门在(ex,ey)的位置。Ignatius每分钟只能从一个坐标走到相邻四个坐标中的其中一个。魔王原创 2014-08-06 14:30:15 · 605 阅读 · 0 评论 -
hdu 1074 状态压缩+DP Doing Homework
Problem Description Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands in原创 2014-08-04 18:00:26 · 452 阅读 · 0 评论 -
hdu 1565 方格取数(1) 状态压缩+dp
Problem Description 给你一个n*n的格子的棋盘,每个格子里面有一个非负数。 从中取出若干个数,使得任意的两个数所在的格子没有公共边,就是说所取的数所在的2个格子不能相邻,并且取出的数的和最大。 Input 包括多个测试实例,每个测试实例包括一个整数n 和n*n个非负数(n Output 对于每个测试实例,输出可能取得的最大的和 Sample原创 2014-08-06 10:01:53 · 384 阅读 · 0 评论 -
poj 2352 Stars 线段树
Description Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars that are原创 2014-07-27 07:27:24 · 327 阅读 · 0 评论 -
hdu 1385 floyd的妙用 Minimum Transport Cost
Problem Description These are N cities in Spring country. Between each pair of cities there may be one transportation track or none. Now there is some cargo that should be delivered from one city to原创 2014-07-27 19:05:08 · 345 阅读 · 0 评论 -
poj 2528 Mayor's posters 线段树+离散化
escription The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their whim. The city council原创 2014-07-22 20:49:44 · 301 阅读 · 0 评论 -
poj 3468 A Simple Problem with Integers 线段树
Description You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other is原创 2014-07-22 07:20:38 · 317 阅读 · 0 评论 -
poj 1151 Atlantis 离散化+线段树
Description There are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps of parts of the island. But unfortunately, these map原创 2014-07-23 13:15:01 · 354 阅读 · 0 评论 -
poj 3264 Balanced Lineup 线段树
Description 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 Ultimate Frisbee with some of the cows.原创 2014-07-21 17:23:17 · 336 阅读 · 0 评论 -
hdu 1698 Just a Hook 线段树
Problem Description 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 sticks which are of the sa原创 2014-07-21 15:49:48 · 349 阅读 · 0 评论 -
poj Corn Fields 3254 状态压缩dp
Description Farmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; 1 ≤ N ≤ 12) square parcels. He wants to grow some yummy corn for the cows on a number of squares原创 2014-08-07 16:43:24 · 333 阅读 · 0 评论