自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(22)
  • 收藏
  • 关注

原创 ZJ1 附加题

题目描述存在n+1个房间,每个房间依次为房间1 2 3…i,每个房间都存在一个传送门,i房间的传送门可以把人传送到房间pi(1<=pi<=i),现在路人甲从房间1开始出发(当前房间1即第一次访问),每次移动他有两种移动策略:A. 如果访问过当前房间 i 偶数次,那么下一次移动到房间i+1;B. 如果访问过当前房间 i 奇数次,那么移动到房间pi;现在路人甲想知道移动到房间n+1一共需要多少次移动;输入描述:第一行包括一个数字n(30%数据1<=n<=100,100%数据

2021-03-05 13:39:09 190

原创 F - Fairy, the treacherous mailman

菜鸡复健F. Fairy, the treacherous mailmantime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFairy is a very excentric mailman. Every now and then, he likes to change some correspondences that he is respon

2021-03-04 16:34:46 192 1

原创 Bad Hair Day POJ - 3250 (dp)

Some of Farmer John’s N cows (1 ≤ N ≤ 80,000) are having a bad hair day! Since each cow is self-conscious about her messy hairstyle, FJ wants to count the number of other cows that can see the top of ...

2019-09-02 20:29:35 201

原创 Brackets Sequence POJ - 1141(经典区间DP)

Let us define a regular brackets sequence in the following way:Empty sequence is a regular sequence.If S is a regular sequence, then (S) and [S] are both regular sequences.If A and B are regular s...

2019-08-19 09:59:08 158

原创 车车排队队(数学题)

题意:在过一个路口的时候,主角车车发现自己前面有n个车车,每个车车有三个属性:车车长度,车车离停车线距离,车车最大速度。然后如果有一个车车比前面那个车快,他不能超车,他只能以零距离紧贴在前面的车车后面以前面的车车速度行驶。否则就以最大速度行驶。主角想要知道自己的车车车头碰到停车线需要的时间。输入:多组输入一个nn+1个车车的长度(第0个是主角车)n+1个车车距离停车线的距离n+1个车车...

2019-07-23 12:42:17 310

原创 Path 最短路

题意:在一个图内,删除一条边的代价是这条路的长度。现在需要求使从点1到点n最短路变长的最小代价。(不需要保证必须存在一条通路)输入:组数(1-10)点数(1-10000) 路数(1-10000)起点 重点 长度……输出:最小代价Sample Input13 41 2 12 3 11 3 21 3 3Sample Output3思路:按照网上流行的类似题目算法,需要用S...

2019-07-23 12:25:49 145

原创 Remainders Game CodeForces - 687B(数论)

Today Pari and Arya are playing a game called Remainders.Pari chooses two positive integer x and k, and tells Arya k but not x. Arya have to find the value . There are n ancient numbers c1, c2, …, cn...

2019-07-12 19:45:55 373

原创 CodeForces - 1107D Compression(思维)

You are given a binary matrix A of size n×n. Let’s denote an x-compression of the given matrix as a matrix B of size nx×nx such that for every i∈[1,n],j∈[1,n] the condition A[i][j]=B[⌈i/x⌉][⌈j/x⌉] is ...

2019-06-27 16:08:20 332

原创 Chladni Figure CodeForces - 1162D(几何)

Inaka has a disc, the circumference of which is n units. The circumference is equally divided by n points numbered clockwise from 1 to n, such that points i and i+1 (1≤i<n) are adjacent, and so are...

2019-05-08 21:17:32 514

原创 CodeForces - 1153D. Serval and Rooted Tree(树状dp)

D. Serval and Rooted TreeNow Serval is a junior high school student in Japari Middle School, and he is still thrilled on math as before.As a talented boy in mathematics, he likes to play with number...

2019-04-17 23:19:41 245

原创 Two Merged Sequences CodeForces - 1144G(贪心)

B - Two Merged Sequences CodeForces - 1144GTwo integer sequences existed initially, one of them was strictly increasing, and another one — strictly decreasing.Strictly increasing sequence is a seque...

2019-04-03 21:38:46 234

原创 Coins POJ - 1742(dp)

People in Silverland use coins.They have coins of value A1,A2,A3…An Silverland dollar.One day Tony opened his money-box and found there were some coins.He decided to buy a very nice watch in a nearby ...

2019-04-02 09:27:38 139

原创 CodeForces-607B Zuma(dp)

Genos recently installed the game Zuma on his phone. In Zuma there exists a line of n gemstones, the i-th of which has color ci. The goal of the game is to destroy all the gemstones in the line as qui...

2019-03-24 23:32:18 166

原创 To the Max(dp)

Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located within the whole array. The sum of a rectangle is the sum of...

2019-03-06 22:47:21 167

原创 CodeForces - 219D Choosing Capital for Treeland(树状dp)

The country Treeland consists of n cities, some pairs of them are connected with unidirectional roads. Overall there are n - 1 roads in the country. We know that if we don’t take the direction of the ...

2019-02-17 10:07:51 216

原创 HDU - 6261 Rikka with Mutex(二分)

Sometimes, technical terms implicate some life philosophy. Mutex is one of them. On your way to dream, you may be locked by some difficulties, and you need someone to stop his step, and help you get t...

2019-02-16 18:30:33 157

原创 Gym - 101915G Robots(贪心)

The Robotics Olympiad teams were competing in a contest.There was a tree drawn on the floor, consisting of n nodes and n - 1 edges. The nodes are numbered from 1 to n, and each edge has a weight. The...

2019-02-16 09:56:02 335

原创 CodeForces - 1105D Kilani and the Game(bfs)

Kilani is playing a game with his friends. This game can be represented as a grid of size n×m, where each cell is either empty or blocked, and every player has one or more castles in some cells (there...

2019-02-11 23:15:38 209

原创 Codeforces Global Round 1 D. Jongmah(DP)

D. Jongmahtime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are playing a game of Jongmah. You don’t need to know the rules to solve this p...

2019-02-09 22:38:52 381

原创 HDU - 3555 Bomb (数位dp入门题)

The counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number sequence of the time bomb counts from 1 to N. If the current number sequence inc...

2019-01-27 12:48:04 239

原创 CodeForces - 95C Volleyball

Petya loves volleyball very much. One day he was running late for a volleyball match. Petya hasn’t bought his own car yet, that’s why he had to take a taxi. The city has n junctions, some of which are...

2019-01-25 21:00:37 223

原创 Codeforces Round #526 (Div. 2) D

The Fair Nut is going to travel to the Tree Country, in which there are n cities. Most of the land of this country is covered by forest. Furthermore, the local road system forms a tree (connected grap...

2019-01-25 20:40:42 114

空空如也

空空如也

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

TA关注的人

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