*博客头图：

RGB颜色，例如：#AFAFAF

Hover：

RGB颜色，例如：#AFAFAF

RGB颜色，例如：#AFAFAF

杭锦泉的博客

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

原创 msp430g2553的IIC通信

2017-11-26 22:37:09 2495

原创 HDU 3987 Harry Potter and the Forbidden Forest

DescriptionHarry Potter notices some Death Eaters try to slip into Castle. The Death Eaters hide in the most depths of Forbidden Forest. Harry need stop them as soon as. The Forbidden Forest

2016-08-31 11:18:24 199

原创 hdu3388 Coprime 二分+容斥原理

DescriptionPlease write a program to calculate the k-th positive integer that is coprime with m and n simultaneously. A is coprime with B when their greatest common divisor is 1.Input

2016-08-26 17:01:53 465

原创 HDU 4405 Aeroplane chess(概率DP求期望)

DescriptionHzz loves aeroplane chess very much. The chess map contains N+1 grids labeled from 0 to N. Hzz starts at grid 0. For each step he throws a dice(a dice have six faces with equal probabil

2016-08-26 15:09:15 361

原创 HDU 4034 Graph

DescriptionEveryone knows how to calculate the shortest path in a directed graph. In fact, the opposite problem is also easy. Given the length of shortest path between each pair of vertexes, can y

2016-08-25 15:14:20 172

原创 HDU 4028 The time of a day

DescriptionThere are no days and nights on byte island, so the residents here can hardly determine the length of a single day. Fortunately, they have invented a clock with several pointers. They h

2016-08-25 14:09:57 167

原创 HDU 4022 Bombing

DescriptionIt’s a cruel war which killed millions of people and ruined series of cities. In order to stop it, let’s bomb the opponent’s base. It seems not to be a hard work in circumstances of s

2016-08-25 14:08:27 187

原创 POJ 3468 A Simple Problem with Integers 树状数组解法

DescriptionYou have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other i

2016-08-25 14:05:58 145

原创 贪吃蛇self3

2016-08-23 18:13:00 128

原创 贪吃蛇self2

2016-08-23 18:08:41 132

原创 贪吃蛇self1

2016-08-23 18:06:55 123

原创 HDU 1394 Minimum Inversion Number 树状数组

DescriptionThe inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i aj. For a given sequence of numbers a1, a2, ..., an, if we move the f

2016-08-23 16:58:14 101

原创 POJ 2481 Cows 树状数组

DescriptionFarmer John's cows have discovered that the clover growing along the ridge of the hill (which we can think of as a one-dimensional number line) in his field is particularly good. Fa

2016-08-23 15:44:47 133

原创 POJ 2299 Ultra-QuickSort 树状数组

DescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the seq

2016-08-23 13:57:36 112

原创 POJ 3067 Japan 树状数组

DescriptionJapan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the venue. Japan is tall island with N cities on the East coast and M cities on the West coast (M <

2016-08-23 13:12:35 107

原创 poj 2352 && hdu 1541 Stars (树状数组)

DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars that are

2016-08-22 20:31:34 134

原创 HDU 1556 Color the ball(树状数组)

DescriptionN个气球排成一排，从左到右依次编号为1,2,3....N.每次给定2个整数a b(a Input每个测试实例第一行为一个整数N,(N 当N = 0，输入结束。Output每个测试实例输出一行，包括N个整数，第I个数代表第I个气球总共被涂色的次数。Sample Input31 12 2

2016-08-22 20:21:49 96

原创 POJ 2182 Lost Cows树状数组

DescriptionN (2 <= N <= 8,000) cows have unique brands in the range 1..N. In a spectacular display of poor judgment, they visited the neighborhood 'watering hole' and drank a few too many beers be

2016-08-22 17:27:04 123

原创 POJ3321:Apple Tree(树状数组)

DescriptionThere is an apple tree outside of kaka's house. Every autumn, a lot of apples will grow in the tree. Kaka likes apple very much, so he has been carefully nurturing the big apple tree.

2016-08-22 15:41:13 362

原创 概率dp UVA 11762 Race to 1

2016-08-19 13:04:31 134

原创 POJ - 1222 EXTENDED LIGHTS OUT高斯消元

DescriptionIn an extended version of the game Lights Out, is a puzzle with 5 rows of 6 buttons each (the actual puzzle has 5 rows of 5 buttons each). Each button has a light. When a button is pres

2016-08-19 10:52:07 109

原创 UVA 108 Maximum Sum 最大连续子矩阵和

DescriptionBackgroundA problem that is simple to solve in one dimension is often much more difficult to solve in more than one dimension. Consider satisfying a boolean expression in conjun

2016-08-17 17:29:38 125

原创 Fibonacci

DescriptionIn the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn − 1 + Fn − 2 for n ≥ 2. For example, the first ten terms of the Fibonacci sequence are:0, 1, 1, 2, 3, 5, 8, 13, 21,

2016-08-17 15:55:49 104

原创 矩阵乘法 Matrix Power Series

DescriptionGiven a n × n matrix A and a positive integer k, find the sum S = A + A2 + A3 + … + Ak.InputThe input contains exactly one test case. The first line of input contain

2016-08-17 15:51:33 125

原创 Dave

DescriptionRecently, Dave is boring, so he often walks around. He finds that some places are too crowded, for example, the ground. He couldn't help to think of the disasters happening recently. Cr

2016-08-17 11:02:39 263

原创 二分法 The Frog's Games

DescriptionThe annual Games in frogs' kingdom started again. The most famous game is the Ironfrog Triathlon. One test in the Ironfrog Triathlon is jumping. This project requires the frog athletes

2016-08-16 16:30:02 454

原创 优先队列 The kth great number

DescriptionXiao Ming and Xiao Bao are playing a simple Numbers game. In a round Xiao Ming can choose to write down a number, or ask Xiao Bao what the kth great number is. Because the number writte

2016-08-16 15:43:40 144

原创 Lweb and String

Problem DescriptionLweb has a string S.Oneday, he decided to transform this string to a new sequence. You need help him determine this transformation to get a sequence which has the longes

2016-08-16 14:26:27 276

原创 A water problem

Problem DescriptionTwo planets named Haha and Xixi in the universe and they were created with the universe beginning.There is 73 days in Xixi a year and 137 days in Haha a year. Now yo

2016-08-16 14:21:59 134

原创 Zhu and 772002

Problem DescriptionZhu and 772002 are both good at math. One day, Zhu wants to test the ability of 772002, so he asks 772002 to solve a math problem. But 772002 has a appointment with his girl

2016-08-16 14:16:36 437

DescriptionTed is a employee of Always Cook Mushroom (ACM). His boss Matt gives him a pack of mushrooms and ask him to grade each mushroom according to its weight. Suppose the weight of a mushroom

2016-08-13 17:36:27 122

原创 HDU4277 USACO ORZ

DescriptionLike everyone, cows enjoy variety. Their current fancy is new shapes for pastures. The old rectangular shapes are out of favor; new geometries are the favorite. I. M. Hei, the lead co

2016-08-13 15:46:22 239

原创 HDU 4282 A very hard mathematic problem

Description　　Haoren is very good at solving mathematic problems. Today he is working a problem like this: 　　Find three positive integers X, Y and Z (X 1) that holds 　　 X^Z + Y^Z + XYZ = K

2016-08-13 12:20:15 739

原创 HDU5477 A Sweet Journey

DescriptionMaster Di plans to take his girlfriend for a travel by bike. Their journey, which can be seen as a line segment of length L, is a road of swamps and flats. In the swamp, it takes A poin

2016-08-13 10:41:52 164

原创 HDU4278 Faulty Odometer

Description　　You are given a car odometer(里程表) which displays the miles traveled as an integer(整数). The odometer has a defect(缺点), however: it proceeds(收入) from the digit(数字) 2 to the digit 4

2016-08-13 10:13:51 168

原创 概率dp HDU4336 Card Collector

DescriptionIn your childhood, do you crazy for collecting the beautiful cards in the snacks? They said that, for example, if you collect all the 108 people in the famous novel Water Margin, you wi

2016-08-11 19:46:04 123

原创 数位dp HDU 3555 Bomb

DescriptionThe 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 numb

2016-08-11 17:10:49 118

原创 状态dp POJ 3254 Corn Fields

DescriptionFarmer 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 squar

2016-08-11 14:40:58 116

原创 概率dp LightOJ 1030 Discovering Gold

DescriptionYou are in a cave, a long cave! The cave can be represented by a 1 x N grid. Each cell of the cave can contain any amount of gold.Initially you are in position 1. Now each turn you th

2016-08-10 20:45:08 148

原创 kmp Seek the Name, Seek the Fame

DescriptionThe little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly-born babies. They seek the name, and at the sa

2016-08-09 14:30:44 115

空空如也

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

TA关注的人 TA的粉丝