自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

WZJRJ28

为了看到更大的世界

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

原创 Uva-1228 Integer Transmission(贪心+DP)

题意:你要在一个仿真网络中传输一个n比特的非负整数k。各比特从左到右传输,第i个比特的发送时间个i。每个比特的网络延迟总是0~d之间的实数。若同时有多个比特到达,实际收到的顺序任意。求实际收到的整数有多少种,以及它们的最小值和最大值。分析:最大值就是把所有的0都设置d延迟所有1设置0延迟,最小相反。对于一个数p现在我们想判断它能不能通过对k设置一定延迟来得到,很容易发现这个问题可以直接

2017-03-29 15:45:34 902

原创 Hdu-2770 Easy Climb(DP优化)

Somewhere in the neighborhood we have a very nice mountain that gives a splendid view over the surrounding area. There is one problem though: climbing this mountain is very difficult, because of rathe

2017-03-22 10:21:52 439

原创 Codeforces Round #405 Div. 1 Bear and Company(DP)

Bear Limak prepares problems for a programming competition. Of course, it would be unprofessional to mention the sponsor name in the statement. Limak takes it seriously and he is going to change some

2017-03-20 15:45:38 596

原创 Codeforces Round #405 Div. 1 B. Bear and Tree Jumps

A tree is an undirected connected graph without cycles. The distance between two vertices is the number of edges in a simple path between them.Limak is a little polar bear. He lives in a tree that

2017-03-20 11:39:31 638

原创 Codeforces Round #404 (Div. 2) E. Anton and Permutation(分块+二分)

Anton likes permutations, especially he likes to permute their elements. Note that a permutation of n elements is a sequence of numbers{a1, a2, ..., an}, in which every number from 1 to n appears

2017-03-18 23:12:55 331

原创 Codeforces Round #404 (Div. 2) D. Anton and School - 2(范德蒙恒等式)

As you probably know, Anton goes to school. One of the school subjects that Anton studies is Bracketology. On the Bracketology lessons students usually learn different sequences that consist of round b

2017-03-18 13:20:48 638

原创 Uva-1204 Fun Game(状压DP)

题意:一群小孩(至少两个)围成一圈做游戏。每一轮从某个小孩开始往他左边或者右边传手帕。一个小孩拿到手帕后在手帕上写上自己的性别,男孩写B,女孩写G,然后按照相同的方向传递给下一个小孩,每一轮都可能在任何一个小孩写完后停止,现在游戏已经进行了n轮,已知n轮中每轮手帕上留下的字,问最少可能有几个小孩。分析:我们可以在预处理时把所有相互包含的字符串合并,然后f[i][j][k] 表示当前字符

2017-03-15 20:37:29 564

原创 Uva-10934 Dropping water balloons(dp)

题意:现在你需要确定一种气球的硬度;每次你要拿着一个气球爬到f层,然后将它摔到地面,如果气球破了说明它的硬度不超过f,如果没破说明其硬度至少为f,每次实验后气球不会损坏,现在有n层楼,你有k个这种气球,问至少实验多少次能测出这种气球的硬度.分析:如果没有气球个数限制很容易想到直接二分那样去做,但是现在气球会有损耗,问题可以转化为有i个气球丢j次可以测量的最大楼层数(迷之思路啊),然后我

2017-03-13 22:07:23 528

原创 Uva-1627 Team them up!(背包变形)

题意:有(n分析:把所有不互相认识的人之间连一条边,然后问题就变成了让我们对整个图黑白染色,且要求同色点之间不能有边,如果原图不是二分图则直接无解,否则在每个连通分量中染色后dp。#include #define mask 100using namespace std;int T,t,n,cnt,f[105][205],cho[105][205],g[105][105

2017-03-13 20:04:26 564

原创 ICPCCamp Day1 C. City United(脑洞状压dp)

题目大意:给n(n 分析:

2017-03-10 21:07:51 444

原创 Codeforces Round #402 (Div. 1) D. Parquet Re-laying(脑洞)

Peter decided to lay a parquet in the room of size n × m, the parquet consists of tiles of size 1 × 2. When the workers laid the parquet, it became clear that the tiles pattern looks not like Peter

2017-03-09 11:20:46 427

原创 Codeforces Round #397 E. Tree Folding(脑洞)

Vanya wants to minimize a tree. He can perform the following operation multiple times: choose a vertex v, and two disjoint (except for v) paths of equal length a0 = v, a1, ..., ak, and b0 = v, b

2017-03-08 10:12:34 271

原创 Codeforces Round #403 D. Axel and Marston in Bitland

A couple of friends, Axel and Marston are travelling across the country of Bitland. There are n towns in Bitland, with some pairs of towns connected by one-directional roads. Each road in Bitland is

2017-03-07 12:45:29 28468

原创 Codeforces Round #403 C. Underground Lab(脑洞)

The evil Bumbershoot corporation produces clones for gruesome experiments in a vast underground lab. On one occasion, the corp cloned a boy Andryusha who was smarter than his comrades. Immediately And

2017-03-06 16:19:05 550

原创 Codeforces Round #403 B. Innokenty and a Football League(二分图匹配)

Innokenty is a president of a new football league in Byteland. The first task he should do is to assign short names to all clubs to be shown on TV next to the score. Of course, the short names should

2017-03-06 14:20:33 443

空空如也

空空如也

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

TA关注的人

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