自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 问答 (1)
  • 收藏
  • 关注

原创 hdu 4857 逃生(拓扑排序)

题目链接题目大意就是:给你一些先后关系,然后输出它们的拓扑序,但是和普通的不一样的地方,输出使编号小的数字尽量靠前的拓扑序,而不一定是字典序。 例如: 4—>2 5—>1—>3正常情况下字典序最小的拓扑序应该是:4 2 5 1 3 这种规则下,则应该是: 5 1 4 2 3解法:自己其实是没有想到看题解的QAQ 在当前入度为0的点中,我们先输出哪个并不能完全取决于这个点的大小,而是

2017-04-25 00:17:30 364

原创 hdu 6006 Engineer Assignment(状压dp)

题目链接Problem DescriptionIn Google, there are many experts of different areas. For example, MapReduce experts, Bigtable experts, SQL experts, etc. Directors need to properly assign experts to various pro

2017-04-24 15:48:53 1274

原创 zoj 3777 Problem Arrangement(状压dp)

题目链接The 11th Zhejiang Provincial Collegiate Programming Contest is coming! As a problem setter, Edward is going to arrange the order of the problems. As we know, the arrangement will have a great effec

2017-04-16 22:53:13 426

原创 2017WHU校赛OL Werewolf (基环外向树)

题目链接题目大意:有n个玩家,编号1~n,已知狼人不会投狼人,其他人可能投任何人,给你一局投票的情况,判断最多有多少狼人。比赛时没有什么思路,题解说是基环外向树,第一次听到这个名词感觉十分高端,搜了一下才发现这个东西就是一颗普通的树再加上一条边,那么一定会在这个树里形成一个环,外向树是说其他链的方向指向外,内向树则是指向内。对于n个玩家,每个人投一票,构成的关系便有n条边,这些点不一定是相互连通的,

2017-04-12 22:00:01 480

原创 hdu 3549 Flow Problem(最大流模板题)

题目链接最大流的模板题,今天写了一个dinic的模板想测试一下,结果T到天荒地老,一度怀疑人生,到最后发现竟然是数组开小了。。。双向边数组要开两倍啊。。。 我这个智障……记录模板 Dinic + 链式前向星存图#include <iostream>#include <queue>#include <cstdio>#include <cstring>#include <string>usi

2017-04-12 21:31:08 456

原创 poj 2387 Til the Cows Come Home (最短路)

Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to get ba

2017-04-04 21:20:22 305

原创 poj 1251 Jungle Roads(最小生成树)

The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessly, so

2017-04-04 21:15:18 316

原创 poj 2836 Rectangular Covering (状压dp)

n points are given on the Cartesian plane. Now you have to use some rectangles whose sides are parallel to the axes to cover them. Every point must be covered. And a point can be covered by several rec

2017-04-04 20:49:57 268

原创 poj 3254 Corn Fields(状压dp)

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. Regrettably, s

2017-04-04 20:20:47 209

原创 poj 2441 Arrange the Bulls(状压dp)

Farmer Johnson’s Bulls love playing basketball very much. But none of them would like to play basketball with the other bulls because they believe that the others are all very weak. Farmer Johnson has

2017-04-04 20:11:39 364

原创 poj 2686 Traveling by Stagecoach (状压dp)

DescriptionOnce upon a time, there was a traveler. He plans to travel using stagecoaches (horse wagons). His starting point and destination are fixed, but he cannot determine his route. Your job in thi

2017-04-04 19:51:45 342

空空如也

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

TA关注的人

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