自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Codeforces Round #611 (Div. 3) C题

Friends and GiftsThere are n friends who want to give gifts for the New Year to each other. Each friend should give exactly one gift and receive exactly one gift. The friend cannot give the gift to h...

2019-12-29 14:26:45 604 1

原创 Codeforces Round #610 (Div. 2) B题

K for the Price of One (Hard Version)This is the hard version of this problem. The only difference is the constraint on k — the number of gifts in the offer. In this version: 2≤k≤n.Vasya came to the...

2019-12-25 15:46:37 477

原创 Codeforces Round #609 (Div. 2) C题

Long Beautiful IntegerYou are given an integer x of n digits a1,a2,…,an, which make up its decimal notation in order from left to right.Also, you are given a positive integer k<n.Let’s call inte...

2019-12-22 11:24:04 189

原创 Educational Codeforces Round 78 (Rated for Div. 2) C题

Berry JamKarlsson has recently discovered a huge stock of berry jam jars in the basement of the house. More specifically, there were 2n jars of strawberry and blueberry jam.All the 2n jars are arran...

2019-12-20 14:49:50 388

原创 Codeforces Global Round 6 C题

Diverse MatrixLet a be a matrix of size r×c containing positive integers, not necessarily distinct. Rows of the matrix are numbered from 1 to r, columns are numbered from 1 to c. We can construct an ...

2019-12-18 09:22:23 192

原创 Codeforces Round #607 (Div. 2) B题

Azamon Web ServicesYour friend Jeff Zebos has been trying to run his new online company, but it’s not going very well. He’s not getting a lot of sales on his website which he decided to call Azamon. ...

2019-12-15 16:08:52 331

原创 Codeforces Round #605 (Div. 3) (D题)

Remove One ElementYou are given an array a consisting of n integers.You can remove at most one element from this array. Thus, the final length of the array is n−1 or n.Your task is to calculate the...

2019-12-13 16:24:06 243

原创 Paintball(UVA - 11853)

PaintballYou are playing paintball on a 1000 × 1000 square field. Anumber of your opponents are on the field hiding behind treesat various positions. Each opponent can fire a paintball acertain di...

2019-12-11 23:39:09 242

原创 Ideal Path (UVA - 1599 )

Ideal PathNew labyrinth attraction is open in New Lostland amusement park. The labyrinth consists of n roomsconnected by m passages. Each passage is colored into some color ci. Visitors of the laby...

2019-12-11 16:21:37 269

原创 Play on Words(UVA - 10129)

Play on WordsSome of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solveit to open that doors. Because there is no other way to open the doors, the puzzl...

2019-12-09 21:11:28 298

原创 欧拉回路学习笔记

欧拉回路欧拉道路:概念:从无向图中的一个结点出发走出一条道路,每条边恰好经过一次。这样的路线称为欧拉道路,也可形象的称为“一笔画”。性质:除了起点和终点以外,其他点的“进出”次数应该相等。换句话说,除了起点和终点以外,其他点的度数应该是偶数;这也就引出了欧拉道路的充分条件:如果一个无向图是连通的,且最多只有两个奇点,则一定是欧拉道路。且必须从一个奇点出发,另一个奇点终止;如果没有奇点,...

2019-12-08 17:35:41 201

原创 The Falling Leaves (UVA - 699 )

The Falling LeavesEach year, fall in the North Central region is accompanied by the brilliant colors of the leaves on thetrees, followed quickly by the falling leaves accumulating under the trees. I...

2019-12-07 19:19:45 104

原创 dfs+&的运用 Not so Mobile (UVA 839)

Not so MobileBefore being an ubiquous communications gadget, a mobilewas just a structure made of strings and wires suspendingcolourfull things. This kind of mobile is usually found hangingover cr...

2019-12-07 17:08:50 91

原创 dfs建树求前序遍历 Tree (UVA 548)

TreeYou are to determine the value of the leaf node in a given binary tree that is the terminal node of apath of least value from the root of the binary tree to any leaf. The value of a path is the ...

2019-12-06 20:50:22 177

原创 Codeforces Round #604 (Div. 2) D题

Beautiful SequenceAn integer sequence is called beautiful if the difference between any two consecutive numbers is equal to 1. More formally, a sequence s1,s2,…,sn is beautiful if |si−si+1|=1 for all...

2019-12-06 17:44:14 146

原创 Codeforces Round #604 (Div. 2) C题

Beautiful Regional ContestSo the Beautiful Regional Contest (BeRC) has come to an end! n students took part in the contest. The final standings are already known: the participant in the i-th place so...

2019-12-06 16:31:23 254

原创 Codeforces Round #604 (Div. 2) B题

Beautiful NumbersYou are given a permutation p=[p1,p2,…,pn] of integers from 1 to n. Let’s call the number m (1≤m≤n) beautiful, if there exists two indices l,r (1≤l≤r≤n), such that the numbers [pl,pl...

2019-12-06 15:07:47 514

原创 接苹果(洛谷 P2690)

题目描述很少有人知道奶牛爱吃苹果。农夫约翰的农场上有两棵苹果树(编号为1和2), 每一棵树上都长满了苹果。奶牛贝茜无法摘下树上的苹果,所以她只能等待苹果 从树上落下。但是,由于苹果掉到地上会摔烂,贝茜必须在半空中接住苹果(没有人爱吃摔烂的苹果)。贝茜吃东西很快,她接到苹果后仅用几秒钟就能吃完。每一分钟,两棵苹果树其中的一棵会掉落一个苹果。贝茜已经过了足够的训练, 只要站在树下就一定能接住这棵树上...

2019-12-03 23:24:44 420

原创 货币系统 Money Systems(洛谷 P1474)

货币系统 Money Systems题目描述母牛们不但创建了它们自己的政府而且选择了建立了自己的货币系统。由于它们特殊的思考方式,它们对货币的数值感到好奇。传统地,一个货币系统是由1,5,10,20 或 25,50, 和 100的单位面值组成的。母牛想知道有多少种不同的方法来用货币系统中的货币来构造一个确定的数值。举例来说, 使用一个货币系统 {1,2,5,10,…}产生 18单位面值的...

2019-12-03 22:41:14 474

原创 线性dp 晚餐队列安排 (洛谷 P2837)

晚餐队列安排题目描述为了避免餐厅过分拥挤,FJ要求奶牛们分2批就餐。每天晚饭前,奶牛们都会在餐厅前排队入内,按FJ的设想,所有第2批就餐的奶牛排在队尾,队伍的前半部分则由设定为第1批就餐的奶牛占据。由于奶牛们不理解FJ的安排,晚饭前的排队成了一个大麻烦。 第i头奶牛有一张标明她用餐批次D_i(1 <= D_i <= 2)的卡片。虽然所有N头奶牛排成了很整齐的队伍,但谁都看得出来,卡...

2019-12-02 17:48:22 252

原创 [HAOI2012]音量调节(洛谷 P1877)

[HAOI2012]音量调节题目描述一个吉他手准备参加一场演出。他不喜欢在演出时始终使用同一个音量,所以他决定每一首歌之前他都需要改变一次音量。在演出开始之前,他已经做好一个列表,里面写着每首歌开始之前他想要改变的音量是多少。每一次改变音量,他可以选择调高也可以调低。音量用一个整数描述。输入文件中整数beginLevel,代表吉他刚开始的音量,整数maxLevel,代表吉他的最大音量。音量不...

2019-12-02 16:29:32 256

空空如也

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

TA关注的人

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