- 博客(68)
- 资源 (3)
- 收藏
- 关注
原创 HDU - 4902 Nice boat
DescriptionThere is an old country and the king fell in love with a devil. The devil always asks the king to do some crazy things. Although the king used to be wise and beloved by his people. Now
2014-07-31 21:25:51 937
原创 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
2014-07-31 10:20:02 777
原创 HDU - 3117 Fibonacci Numbers
DescriptionThe Fibonacci sequence is the sequence of numbers such that every element is equal to the sum of the two previous elements, except for the first two elements f0 and f1 which are respect
2014-07-30 21:05:30 852
原创 HDU - 2842 Chinese Rings
DescriptionDumbear likes to play the Chinese Rings (Baguenaudier). It’s a game played with nine rings on a bar. The rules of this game are very simple: At first, the nine rings are all on the bar.
2014-07-30 19:16:22 1287
原创 HDU - 2294 Pendant (DP滚动数组降维+矩阵快速幂)
DescriptionOn Saint Valentine's Day, Alex imagined to present a special pendant to his girl friend made by K kind of pearls. The pendant is actually a string of pearls, and its length is defined a
2014-07-30 16:40:35 1204
原创 HDU - 2276 Kiki & Little Kiki 2
DescriptionThere are n lights in a circle numbered from 1 to n. The left of light 1 is light n, and the left of light k (1< k<= n) is the light k-1.At time of 0, some of them turn on, and others t
2014-07-30 10:28:18 922
原创 HDU - 2254 奥运 (求等比数列和)
Description北京迎来了第一个奥运会,我们的欢呼声响彻中国大地,所以今年的奥运金牌 day day up! 比尔盖兹坐上鸟巢里,手里摇着小纸扇,看的不亦乐乎,被俺们健儿的顽强拼搏的精神深深的感动了。反正我的钱也多的没地方放了,他对自己说,我自己也来举办一个奥运会,看谁的更火。不过他的奥运会很特别:1 参加人员必须是中国人; 2 至少会加法运算(因为要计算本人获得的金
2014-07-29 22:57:31 974
原创 HDU - 1588 Gauss Fibonacci (矩阵快速幂+二分求等比数列和)
DescriptionWithout expecting, Angel replied quickly.She says: "I'v heard that you'r a very clever boy. So if you wanna me be your GF, you should solve the problem called GF~. "How good an oppo
2014-07-29 19:12:55 907
原创 HDU - 1757 A Simple Math Problem (构造矩阵)
DescriptionLele now is thinking about a simple function f(x).If x If x >= 10 f(x) = a0 * f(x-1) + a1 * f(x-2) + a2 * f(x-3) + …… + a9 * f(x-10);And ai(0Now, I will give a0 ~ a9 and two
2014-07-29 09:20:02 653
原创 HDU - 2256 Problem of Precision
Description InputThe first line of input gives the number of cases, T. T test cases follow, each on a separate line. Each test case contains one positive integer n. (1
2014-07-28 19:58:32 678
原创 HDU - 1061 Rightmost Digit
DescriptionGiven a positive integer N, you should output the most right digit of N^N. InputThe input contains several test cases. The first line of the input is a single integer
2014-07-28 18:22:01 745
原创 HDU - 2604 Queuing (矩阵快速幂)
DescriptionQueues and Priority Queues are data structures which are known to most computer scientists. The Queue occurs often in our daily life. There are many people lined up at the lunch time.
2014-07-28 18:21:55 1136
原创 HDU 4883 TIANKENG’s restaurant
Problem DescriptionTIANKENG manages a restaurant after graduating from ZCMU, and tens of thousands of customers come to have meal because of its delicious dishes. Today n groups of customers come to
2014-07-28 11:41:00 810
原创 HDU - 1789 Doing Homework again
DescriptionIgnatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands in the ho
2014-07-28 11:35:41 1355
原创 POJ - 3249 Test for Job (DAG+topsort)
DescriptionMr.Dog was fired by his company. In order to support his family, he must find a new job as soon as possible. Nowadays, It's hard to have a job, since there are swelling numbers of the
2014-07-27 18:46:49 1018
原创 URAL - 1057 Amount of Degrees
DescriptionCreate a code to determine the amount of integers, lying in the set [X; Y] and being a sum of exactly K different integer degrees ofB. Example. Let X=15, Y=20,K=2, B=2. By
2014-07-27 15:55:05 1109
原创 SPOJ - MYQ10 Mirror Number (数位DP)
DescriptionA number is called a Mirror number if on lateral inversion, it gives the same number i.e it looks the same in a mirror. For example 101 is a mirror number while 100 is not. Given two
2014-07-27 10:51:46 1091
原创 POJ - 3522 Slim Span (kruskal+枚举)
DescriptionGiven an undirected weighted graph G, you should find one of spanning trees specified as follows.The graph G is an ordered pair (V, E), where V is a set of vertices {v1,v2, …, vn}
2014-07-26 18:38:49 1007
原创 POJ - 1679 The Unique MST (次小生成树)
DescriptionGiven a connected undirected graph, tell if its minimum spanning tree is unique.Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning tree of
2014-07-26 16:14:13 996
原创 POJ - 3013 Big Christmas Tree
DescriptionChristmas is coming to KCM city. Suby the loyal civilian in KCM city is preparing a big neat Christmas tree. The simple structure of the tree is shown in right picture.The tree can
2014-07-26 14:40:43 1002
原创 HDU - 2089 不要62 (暴力或数位DP)
Description杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。 杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍,更安全地服务大众。不吉利的数字为所有含有4或62的号码。例如: 62315 73418 88914 都属于不吉利号码。但是,61152虽然含有6和2
2014-07-26 09:51:06 1012
原创 HDU - 4507 吉哥系列故事――恨7不成妻 (数位DP)
Description 单身! 依然单身! 吉哥依然单身! DS级码农吉哥依然单身! 所以,他生平最恨情人节,不管是214还是77,他都讨厌! 吉哥观察了214和77这两个数,发现: 2+1+4=7 7+7=7*2 77=7*11 最终,他发现原来这一切归根到底都是因为和7有关!所以,他现在甚至讨厌一切和7有关的数!
2014-07-25 16:32:03 2587
原创 HDU - 3530 Subsequence
DescriptionThere is a sequence of integers. Your task is to find the longest subsequence that satisfies the following condition: the difference between the maximum element and the minimum element
2014-07-25 09:49:43 1397
原创 UVA - 1494 Qin Shi Huang's National Road System (类次小生成树)
DescriptionDuring the Warring States Period of ancient China(476 BC to 221 BC), there were seven kingdoms in China -- they were Qi, Chu, Yan, Han, Zhao, Wei and Qin. Ying Zheng was the king of the
2014-07-21 20:12:04 1172
原创 UVA - 11478 Halum (最短路应用+二分)
Description Problem H HalumTime Limit : 3 seconds You are given a directed graph G(V,E) with a set of vertices and edges. Each edge (i,j) that connects some
2014-07-21 16:31:01 968
原创 UVA - 11090 Going in Cycle!! (Bellman-Ford算法判负环)
DescriptionI IU P C2 0 06Problem G: Going in Cycle!!Input: standard input Output: standard output You are given a weighted directed gra
2014-07-21 10:35:20 1014
原创 UVA - 10537 The Toll! Revisited (最短路变形逆推)
DescriptionProblem G Toll! Revisited Input: Standard Input Output: Standard OutputTime Limit: 1 Second Sindbad the Sailor sold 66 silver spoons to the Sultan of Samarkand. The selling
2014-07-21 09:11:57 1713
原创 UVA - 1416 Warfare And Logistics (最短路)
DescriptionThe army of United Nations launched a new wave of air strikes on terroristforces. The objective of the mission is to reduce enemy's logistical mobility. Each airstrike will destroy a pa
2014-07-20 18:42:07 1487
原创 UVA - 10917 Walk Through the Forest (最短路+DP)
DescriptionProblem C: A Walk Through the ForestJimmy experiences a lot of stress at work these days, especially since his accident made working difficult. To relax after a hard day, he likes to
2014-07-20 12:00:13 991
原创 UVA - 11374 Airport Express (Dijkstra模板+枚举)
DescriptionProblem D: Airport ExpressIn a small city called Iokh, a train service, Airport-Express, takes residents to the airport more quickly than other transports. There are
2014-07-20 10:33:28 946
原创 UVA - 10298 Power Strings (KMP求字符串循环节)
DescriptionProblem D: Power StringsGiven two strings a and b we define a*b to be their concatenation. For example, ifa = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation a
2014-07-19 16:23:09 1230
原创 UVA - 586 Instant Complexity
Description Instant Complexity Analyzing the run-time complexity of algorithms is an important tool for designing efficient programs that solve a problem. An algorithm that r
2014-07-19 14:59:41 897
原创 UVA - 501 Black Box (优先队列或vector)
Description Black Box Our Black Box represents a primitive database. It can save an integer array and has a speciali variable. At the initial moment Black Box is empty and
2014-07-19 10:50:26 1218
原创 UVA - 10273 Eat or Not to Eat?
DescriptionProblem EEat or not to Eat?Input: Standard InputOutput: Standard OutputA young farmer has N cows, but they produced really really a very very small amount of milk. John ca
2014-07-18 19:30:25 1426
原创 UVA - 12130 Summits
DescriptionProblem G - SummitsTime limit: 8 secondsYou recently started working for the largest map drawing company in theNetherlands. Part of your job is to determine what the summits in apar
2014-07-18 15:37:46 1039
原创 UVA - 12232 Exclusive-OR (并查集扩展偏离向量)
DescriptionYou are not given n non-negative integersX0, X1,..., Xn-1 less than220, but they do exist, and their values never change.I'll gradually provide you some facts about them, and as
2014-07-17 19:24:23 1069
原创 UVA - 536 Tree Recovery
Description Tree Recovery Little Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital letters i
2014-07-17 10:42:40 960
原创 POJ - 1363 Rails
DescriptionThere is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited that time. It wa
2014-07-17 09:54:51 886
原创 UVA - 10895 Matrix Transpose
UVA - 10895Matrix TransposeTime Limit:3000MS Memory Limit:Unknown 64bit IO Format:%lld & %llu[Submit] [Go Back] [Status] Description A: Matrix Transp
2014-07-16 21:29:29 1074
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人