自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

MissZhou要努力

路漫漫其修远兮,吾将上下而求索

  • 博客(78)
  • 收藏
  • 关注

原创 HDU 1026 Ignatius and the Princess I 广搜

DescriptionThe Princess has been abducted by the BEelzebub feng5166, our hero Ignatius has to rescue our pretty Princess. Now he gets into feng5166's castle. The castle is a large labyrinth. To ma

2015-08-31 10:50:11 362

原创 hdu54235423 Rikka with Tree

Problem DescriptionAs we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them:For a tree TT, let F(T,i)F(T,i)

2015-08-29 22:38:52 581

原创 hdu5422#53-div2-1Rikka with Graph

Problem DescriptionAs we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them:Yuta has a non-direct graph with 

2015-08-29 21:52:55 608

原创 ZOJ 3430 Detect the Virus ac自动机 超级精简的转化

DescriptionOne day, Nobita found that his computer is extremely slow. After several hours' work, he finally found that it was a virus that made his poor computer slow and the virus was activated b

2015-08-29 16:32:30 741

原创 POJ 3041Asteroids!

裸的棋盘处理==DescriptionBessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 Fortunately, Bessie has a powerful weapon that can vapor

2015-08-23 23:13:44 379

原创 HDU 2768Cat vs. Dog二分图 最大独立集(最大匹配)

今天做的二分图唯一一个比较难的 而且看了题解才发现,又理解错题意了。是说 如果出现喜欢的和别人讨厌的相同,则其中一人会不满意。问最多满意多少人即把喜欢喝讨厌彼此矛盾的建边,个数-最大匹配即为所求DescriptionThe latest reality show has hit the TV: ``Cat vs. Dog''. In this show, a bunch

2015-08-23 23:10:38 724

原创 HDU 2063 过山车 匈牙利二分图最大匹配

DescriptionRPG girls今天和大家一起去游乐场玩,终于可以坐上梦寐以求的过山车了。可是,过山车的每一排只有两个座位,而且还有条不成文的规矩,就是每个女生必须找个个男生做partner和她同坐。但是,每个女孩都有各自的想法,举个例子把,Rabbit只愿意和XHD或PQK做partner,Grass只愿意和linle或LL做partner,PrincessSnow愿意和水域浪子

2015-08-23 23:02:57 411

原创 POJ 2771 Guardian of Decency最大独立集

DescriptionFrank 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 might become couples. While you ca

2015-08-23 22:59:44 422

原创 HDU 2255奔小康赚大钱 二分图最佳匹配KM

Description传说在遥远的地方有一个非常富裕的村落,有一天,村长决定进行制度改革:重新分配房子。 这可是一件大事,关系到人民的住房问题啊。村里共有n间房间,刚好有n家老百姓,考虑到每家都要有房住(如果有老百姓没房子住的话,容易引起不安定因素),每家必须分配到一间房子且只能得到一间房子。 另一方面,村长和另外的村领导希望得到最大的效益,这样村里的机构才会有钱.由于老百姓都比较

2015-08-23 22:53:13 504

原创 HDU 1281 棋盘游戏 二分图最大匹配

Description小希和Gardon在玩一个游戏:对一个N*M的棋盘,在格子里放尽量多的一些国际象棋里面的“车”,并且使得他们不能互相攻击,这当然很简单,但是Gardon限制了只有某些格子才可以放,小希还是很轻松的解决了这个问题(见下图)注意不能放车的地方不影响车的互相攻击。 所以现在Gardon想让小希来解决一个更难的问题,在保证尽量多的“车”的前提下,棋盘里有些格子是可以避开的

2015-08-23 22:49:21 563

原创 HDU 1068 Girls and Boys二分图最大匹配

Descriptionthe second year of the university somebody started a study on the romantic relations between the students. The relation “romantically involved” is defined between one girl and one boy.

2015-08-23 22:39:29 601

原创 POJ 2195 Going Home(二分图最大权值匹配) KM

DescriptionOn 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 an adjacent point. For each littl

2015-08-23 22:33:52 517

原创 最大权闭合图 hdu 3879 Base Station 有模板!

Description新的技术正冲击着手机通讯市场,对于各大运营商来说,这既是机遇,更是挑战。THU集团旗下的CS&T通讯公司在新一代通讯技术血战的前夜,需要做太多的准备工作,仅就站址选择一项,就需要完成前期市场研究、站址勘测、最优化等项目。在前期市场调查和站址勘测之后,公司得到了一共N个可以作为通讯信号中转站的地址,而由于这些地址的地理位置差异,在不同的地方建造通讯中转站需要投入的成

2015-08-23 22:29:25 617

原创 URAL1277Cops and Thieves Dinic最大流

DescriptionThe Galaxy Police (Galaxpol) found out that a notorious gang of thieves has plans for stealing an extremely valuable exhibit from the Earth Planetary Museum — an ancient microprocesso

2015-08-23 22:22:10 846

原创 2015多校联合第十场 hdu5414CRB and String字符串思维题

Problem Description CRB has two strings s and t. In each step, CRB can select arbitrary character c of s and insert any character d (d ≠ c) just after it. CRB wants to convert s to t. But is it

2015-08-21 23:17:56 613

原创 Power Network 网络流入门题)

这个题 一看到字符串处理我就烦啊烦== 在小伙伴的帮助下可算是知道怎么改对了 万恶的格式(你怎么不说自己学的不好-->_-->)DescriptionA power network consists of nodes (power stations, consumers and dispatchers) connected by power transport line

2015-08-21 22:24:53 908

原创 hdu1532Drainage Ditches裸的网络流

Problem DescriptionEvery time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by water for awhile and takes quite a long t

2015-08-21 22:19:41 354

原创 2015多校联合第十场hdu5410CRB and His Birthday 01背包+完全背包

Problem DescriptionToday is CRB's birthday. His mom decided to buy many presents for her lovely son.She went to the nearest shop with M Won(currency unit).At the shop, there are N kinds of

2015-08-21 22:16:13 930

转载 “完全背包”详解及实现(包含背包具体物品的求解)

前言:由于2015多校题 CRB and His Birthday 发现自己完全背包并不是很会T^T 搜了题解看到这篇文章 mark一下~-----Edit by ZhuSenlin HDU        完全背包是在N种物品中选取若干件(同一种物品可多次选取)放在空间为V的背包里,每种物品的体积为C1,C2,…,Cn,与之相对应的价值为W1,W2,…,Wn.求解怎么装物品可使

2015-08-21 21:10:43 881

原创 POJ 3159 Candies差分约束系统 spfa 附:各种最短路比较

DescriptionDuring the kindergarten days, flymouse was the monitor of his class. Occasionally the head-teacher brought the kids of flymouse’s class a large bag of candies and had flymouse distr

2015-08-21 18:54:06 696 1

原创 POJ 1860 Currency Exchange spfa

DescriptionSeveral currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchange operations only with these curren

2015-08-21 16:38:55 568

原创 POJ 2240 Arbitrage floyd

DescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currency. For example, suppose that 1 US Dollar

2015-08-21 16:35:10 502

原创 POJ 3268 Silver Cow Party

DescriptionOne cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M ≤ 100,000) unidirect

2015-08-21 16:30:00 498

原创 hdu1599 find the mincost route

Problem Description杭州有N个景区,景区之间有一些双向的路来连接,现在8600想找一条旅游路线,这个路线从A点出发并且最后回到A点,假设经过的路线为V1,V2,....VK,V1,那么必须满足K>2,就是说至除了出发点以外至少要经过2个其他不同的景区,而且不能重复经过同一个景区。现在8600需要你帮他找一条这样的路线,并且花费越少越好。 Input

2015-08-20 19:30:11 510

原创 poj1734Sightseeing trip floyd最小环

就是裸的最小环  链接DescriptionThere is a travel agency in Adelton town on Zanzibar island. It has decided to offer its clients, besides many other attractions, sightseeing the town. To earn as much

2015-08-20 19:26:22 906 1

原创 POJ 1386 Play on Words 欧拉回路

DescriptionSome of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that doors. Because there is no other way to open the doors, the puzz

2015-08-20 17:22:34 376

原创 POJ 2513 Colored Sticks 欧拉回路+trie树

题目DescriptionYou are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possible to align the sticks in a straight line such that the colors of

2015-08-20 17:13:48 451

原创 CodeForces 508D Tanya and Password欧拉路径

那可是D题啊@。@ 做不上我心安了http://acm.hust.edu.cn/vjudge/contest/view.action?cid=88120#problem/BDescriptionWhile dad was at work, a little girl Tanya decided to play with dad's password to his s

2015-08-20 17:00:25 566

原创 HDU 4109 Instrction Arrangement拓扑排序 关键路径模板

题目!已知其中几对先后顺序及时间差,求整体完成时间 套模板吧#include #include#includeusing namespace std;const int N=1005;int indeg[N],finish[N],n,m;struct node{ int v,cost; struct node *next; node(){

2015-08-20 16:51:50 631

转载 表白专用!

#include #include #define N 50HANDLE hConsole;void gotoxy(int x, int y){ COORD coord; coord.X = x; coord.Y = y; SetConsoleCursorPosition(hConsole, coord);}int main(){ int i,j,k; hConsole

2015-08-19 22:04:09 488

原创 hdu2647reward

InputOne line with two integers n and m ,stands for the number of works and the number of demands .(nthen m lines ,each line contains two integers a and b ,stands for a's reward should be more tha

2015-08-17 19:42:37 308

原创 hdu2094产生冠军

Input输入含有一些选手群,每群选手都以一个整数n(n Output对于每个选手群,若你判断出产生了冠军,则在一行中输出“Yes”,否则在一行中输出“No”。只是需要判断冠军嘛STL是个好东西啊·~set自动判重#include#include#include#includeusing namespace std;in

2015-08-17 19:37:32 502

原创 hdu1285确定比赛名次(最简单的拓扑排序)

Input输入有若干组,每组中的第一行为二个数N(1 Output给出一个符合要求的排名。输出时队伍号之间有空格,最后一名后面没有空格。其他说明:符合条件的排名可能不是唯一的,此时要求输出时编号小的队伍在前;输入数据保证是正确的,即输入数据确保一定能有一个符合要求的排名。 开始想难了XD,还一个劲儿研究怎么套该死的前向星模板 然而一个while套两个fo

2015-08-17 19:34:27 444

原创 hit2060Fibonacci Problem Again

模板题==而且数都不用自己改推导出来这玩意这题就快结束了*^_^* 带上模板 完美1A#include #include#includeusing namespace std;const int MAX=3;long Mod=1000000000;typedef struct{ long long m[MAX][MAX];}Matrix;Matrix P={

2015-08-14 21:01:35 385

原创 hdu1568Fibonacci

前四位==#include #include #include #define Mod 10000using namespace std;long long f[100];const int MAX = 2;typedef struct{ long long m[MAX][MAX];} Matrix;Matrix P = {0,1,

2015-08-14 09:16:35 345

原创 hdu3117Fibonacci Numbers

对于这种用矩阵求完后4位,还得用公式求前4位的===#include #include #include #define Mod 10000using namespace std;long long f[100];const int MAX = 2;typedef struct{ long long m[MAX][MAX];} Matrix;Matr

2015-08-14 09:12:37 409

原创 HDU1250Hat's Fibonacci大数

链接!#include #includeusing namespace std;#define m 2008char data[8760][m+2];int main(){ int i=5,p=m,n,num; // memset(data,0,sizeof(data)); data[1][m]=1;data[2][m]=1;data[3][m]=1;data

2015-08-14 09:06:16 477

原创 hdu1021Fibonacci Again找规律

Problem DescriptionThere are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2). InputInput consists of a sequence of lines, each containing an i

2015-08-14 09:02:17 487

原创 hdu 1316 How Many Fibs?

链接 给定两个数,问中间夹多少斐波那契数这个题算是这次训练里最难的了>_#include #include#includeusing namespace std;char data[1070][107];///char a[200],b[200];int cmp_ab(char *s1,char *s2){ for(int k=0;k<=105;k++) {

2015-08-14 08:58:13 404

原创 hdu1247 hat's words

Hat’s WordsTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 1247DescriptionA hat’s word is a word in the dictionary that is

2015-08-13 17:28:55 377

空空如也

空空如也

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

TA关注的人

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