自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

ProLights的博客

Someday, you can program the lights.

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

原创 UESTC 1050 Different game 构造法

Alice is playing a new game recently. In this game, there are n different kinds of cards. We assume that Alice have ci pieces of cards for ith kind. Alice is asked to divide them into mm piles and then arrange each pile in one line. After that, Alice will

2016-03-31 20:32:08 1555

原创 UESTC 1297 Bank 思维题

Given XCNY (Chinese yuan), can you exchange it to exactly YCNY soon? The only way you have is to spend money at a vending machine once, which has an infinite number of copies of merchandise of all possible positive price. However, you cannot make any assu

2016-03-29 12:31:42 1751

原创 UESTC 1300 Easy Problem 水题

Given n strings Ai, Each string has a non-negative cost Ci. Let’s define the function of string ss: f(s)=∑i=1nCi∗tot(s,i) tot(s,i) represents the number of occurrences of s in Ai Find the maximal value of function f(s) over all strings. Note that s is

2016-03-27 12:35:24 1846

原创 UESTC 95 Ants Run! 水题

Professor Yang likes to play with ants when he is free. What? Are you asking why he plays with ants instead of others? Ah, because ant is the only non-plant living thing which can be found in Qingshuihe Campus of UESTC apart from human beings. This time,

2016-03-26 00:58:14 2322

原创 April Fools Day Contest 2014 H. A + B Strikes Back

A + B is often used as an example of the easiest problem possible to show some contest platform. However, some scientists have observed that sometimes this problem is not so easy to get accepted. Want to try?

2016-03-25 00:18:55 1556

原创 UESTC 1040 Great Inversion 逆序数、构造

There is an array A with length of n. Ai(1≤Ai≤m) is the ith element in A. Please find a possible situation of A so that the inversion number is exactly K.

2016-03-20 21:34:12 1569

原创 UESTC 1034 AC Milan VS Juventus 分情况讨论

Kennethsnow and Hlwt both love football. One day, Kennethsnow wants to review the match in 2003 between AC Milan and Juventus for the Championship Cup. But before the penalty shootout. he fell asleep. The next day, he asked Hlwt for the result. Hlwt said

2016-03-20 12:51:20 1617

原创 UESTC 1146 秋实大哥与连锁快餐店 最小生成树、Prim

秋实大哥开了一家快餐店之后,由于人赢光环的影响,很快就赚得了大量的资金。为了继续实现心中的远大的理想,他打算在全国各地开设分店赚大钱。假设现在有n家快餐店(其中有至少有一家是旗舰店)分布在二维平面上,第i家快餐店的坐标为(xi, yi)。为了方便交通,他打算在一些快餐店之间修建道路使得任意一家快餐店都能够通过道路到达某一家旗舰店。 但是秋实大哥忙于赚钱和过节,没有时间来设计道路,你能帮助秋实大哥算出最少一共需要修建多长的道路吗?

2016-03-16 21:10:25 2659

原创 BestCoder Round #75 King's Order dp:数位dp

After the king's speech , everyone is encouraged. But the war is not over. The king needs to give orders from time to time. But sometimes he can not speak things well. So in his order there are some ones like this: "Let the group-p-p three come to me". As

2016-03-13 14:24:22 1338

原创 BestCoder Round #75 King's Cake 模拟&&优化 || gcd

It is the king's birthday before the military parade . The ministers prepared a rectangle cake of size n \times m(1\le n, m \le 10000)n×m(1≤n,m≤10000) . The king plans to cut the cake himself. But he has a strange habit of cutting cakes. Each time, he will

2016-03-12 22:50:01 1234

原创 UESTC 1144 Big Brother 二分图、最大匹配

现在有nn个囚笼,需要关押mm个犯人,the big brother很担心囚笼的安全性,因为犯人都有自己的想法,他们只想住在特定的囚笼里面,那么 big brother想知道最多 能关押多少个犯人,每个囚笼只能关押一个犯人,一个犯人也只能关押在一个囚笼里面。 Input 第一行 两个整数,N(0≤N≤200) 和 M(0≤M≤200)。N是犯人的数量,M是囚笼的数量。 第二行到第N+1行 一共 N行,每行对应一只犯人。第一个数字 (Si) 是这哥犯人愿意待的囚笼的数量 (0≤Si≤M)。 后面的Si个数表示

2016-03-12 16:32:38 1562

原创 UESTC 1143 传输数据 网络流 最大流 Dinic

机房里面有m台电脑,n台网线,每条网线都每秒中最多传送的数据量,现在需要你计算从标号为1的电脑传送数据到编号为m的电脑,问一秒内最多传送多少数据? Input 第1行: 两个用空格分开的整数N(0≤N≤200)和 M(2≤M≤200)。N网线的数量,M是电脑的数量。 第二行到第N+1行: 每行有三个整数,Si,Ei 和 Ci。Si 和 Ei (1≤Si,Ei≤M) 指明电脑编号,数据从 Si 流向 Ei

2016-03-12 02:53:24 1277

原创 UESTC 1073 秋实大哥与线段树 线段树&&改值与区间和 or 树状数组

“学习本无底,前进莫徬徨。” 秋实大哥对一旁玩手机的学弟说道。 秋实大哥是一个爱学习的人,今天他刚刚学习了线段树这个数据结构。 为了检验自己的掌握程度,秋实大哥给自己出了一个题,同时邀请大家一起来作。 秋实大哥的题目要求你维护一个序列,支持两种操作:一种是修改某一个元素的值;一种是询问一段区间的和。 Input 第一行包含一个整数nn,表示序列的长度。 接下来一行包含nn个整数aiai,表示序列初始的元素。 接下来一行包含一个整数mm,表示操作数。 接下来mm行,每行是以下两种操作之一: 1 x v : 表

2016-03-10 23:11:54 1956 1

原创 UESTC 1063 秋实大哥与妹纸 二叉堆(小根堆)

卡内存的题目,第一次遇到 (┬_┬) 维护好n/2+1个元素就好,后面的push,然后pop 本来用C++STL的priority_queue写了一个,结果爆内存了,MLE 所以用二叉堆来写

2016-03-07 13:37:45 1627 1

原创 UVa 11997 K Smallest Sums 优先队列&&打有序表&&归并

You’re given k arrays, each array has k integers. There are k k ways to pick exactly one element in each array and calculate the sum of the integers. Your task is to find the k smallest sums among them.

2016-03-05 13:58:16 1750 1

原创 UVa 1218 Perfect Service dp:树上dp && 状态转移方程的优化

A network is composed of N computers connected by N - 1 communication links such that any two computers can be communicated via a unique route. Two computers are said to be adjacent if there is a communication link between them. The neighbors of a computer

2016-03-04 16:04:54 965

原创 UVa 1220 Party at Hali-Bula dp:树的最大独立集

Dear Contestant, I'm going to have a party at my villa at Hali-Bula to celebrate my retirement from BCM. I wish I could invite all my co-workers, but imagine how an employee can enjoy a party when he finds his boss among the guests! So, I decide not to inv

2016-03-02 23:31:07 1363

原创 UVa 12186 Another Crisis dp:树上dp

A couple of years ago, a new world wide crisis started, leaving many people with economical problems. Some workers of a particular company are trying to ask for an increase in their salaries. The company has a strict hierarchy, in which each employee has e

2016-03-01 18:37:22 1023

空空如也

空空如也

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

TA关注的人

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