Algorithm
Tailless
这个作者很懒,什么都没留下…
展开
-
HDU1455Sticks(dfs剪枝)
SticksTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8196 Accepted Submission(s): 2394Problem DescriptionGeorge took sticks原创 2015-12-28 23:13:11 · 393 阅读 · 0 评论 -
UVa11038 How Many O's? (计数)
DescriptionProblem E: How many 0's?A Benedict monk No. 16 writes down the decimal representations of all natural numbers between and including m and n, m ≤ n. How many 0's will he write down原创 2015-08-09 16:36:19 · 440 阅读 · 0 评论 -
Light OJ 1067 Combinations
DescriptionGiven n different objects, you want to take k of them. How many ways to can do it?For example, say there are 4 items; you want to take 2 of them. So, you can do it 6 ways.Take 1, 2原创 2015-07-12 09:19:19 · 506 阅读 · 1 评论 -
HDU2553N皇后问题(BFS)
N皇后问题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12120 Accepted Submission(s): 5466Problem Description在N*N的方格棋盘放置了N个皇后,使得原创 2015-07-05 23:37:34 · 645 阅读 · 0 评论 -
HDU1312Red and Black
Red and BlackTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12176 Accepted Submission(s): 7582Problem DescriptionThere is a原创 2015-07-05 23:20:49 · 232 阅读 · 0 评论 -
HDU1258Sum It Up
Sum It UpTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4866 Accepted Submission(s): 2548Problem DescriptionGiven a specifie原创 2015-07-05 23:14:18 · 369 阅读 · 0 评论 -
HDU1233还是畅通工程
还是畅通工程Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem Description某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能原创 2015-06-07 12:33:52 · 461 阅读 · 0 评论 -
HDU1009FatMouse' Trade(贪心)
FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem Description原创 2015-06-19 00:31:45 · 398 阅读 · 0 评论 -
HDU1061 Rightmost Digit(快速幂取模)
Rightmost Digit Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionGiven a positive integer原创 2015-07-03 10:55:40 · 373 阅读 · 0 评论 -
HDU2266How Many Equations Can You Find
How Many Equations Can You FindTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 641 Accepted Submission(s): 421Problem Description原创 2015-07-05 23:05:06 · 897 阅读 · 3 评论 -
Light OJ1336 Sigma Function
Sigma FunctionDescriptionSigma function is an interesting function in Number Theory. It is denoted by the Greek letter Sigma (σ). This function actually denotes the sum of all divisors of a numb原创 2015-08-03 21:16:55 · 556 阅读 · 0 评论 -
HDU1172猜数字
猜数字Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3298 Accepted Submission(s): 1923Problem Description猜数字游戏是gameboy最喜欢的游戏之原创 2015-06-07 16:29:47 · 493 阅读 · 0 评论 -
HDU1052Tian Ji -- The Horse Racing(贪心)
Tian Ji -- The Horse Racing Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Proble原创 2015-06-21 01:16:36 · 414 阅读 · 0 评论 -
POJ 2142The Balance(扩展欧几里得)
The BalanceDescriptionMs. Iyo Kiffa-Australis has a balance and only two kinds of weights to measure a dose of medicine. For example, to measure 200mg of aspirin using 300mg weights and 700mg weights, she can put one 700mg weight on the side of the medic原创 2015-07-17 13:47:50 · 2022 阅读 · 2 评论 -
HDU5222 Exploration(拓扑排序+并查集)
Exploration Time Limit: 30000/15000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Problem DescriptionM原创 2015-07-20 19:33:34 · 482 阅读 · 0 评论 -
HDU4081 Qin Shi Huang's National Road System(次小生成树)
Qin Shi Huang's National Road SystemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionDuring the Warring States Period of ancient China(47原创 2015-08-09 15:55:55 · 284 阅读 · 0 评论 -
HDU4786 Fibonacci Tree(Kruskal)
Fibonacci TreeTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem Description Coach Pang is interested in Fibonacci numbers while Uncle Yang wants him原创 2015-08-09 15:15:33 · 336 阅读 · 0 评论 -
codeforces 327C. Magic Five
C. Magic Fivetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is a long plate s containing n digits.原创 2015-08-06 08:50:35 · 395 阅读 · 0 评论 -
HDU1231最大连续子序列(动态规划)
最大连续子序列Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem Description给定K个整数的序列{ N1, N2, ..., NK },其任意连续子序列可表示为{ Ni, Ni+1, ..., Nj },其中 1 例如给定序列{ -原创 2015-09-23 00:31:47 · 364 阅读 · 0 评论 -
HDU1166敌兵布阵(线段树or树状数组)
敌兵布阵Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 60300 Accepted Submission(s): 25552Problem DescriptionC国的死对头A国这段时间正在进行军事演原创 2015-08-25 08:55:02 · 343 阅读 · 0 评论 -
POJ2935 Basic Wall Maze(BFS)
Basic Wall MazeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2963 Accepted: 1341 Special JudgeDescriptionIn this problem you have to solve a very原创 2015-08-16 17:00:31 · 402 阅读 · 0 评论 -
HDU3411Snail Alice(递推+矩阵快速幂)
Snail AliceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionSnail Alice is a snail indulged in math. One day, when she was walking on the原创 2015-08-19 13:53:38 · 612 阅读 · 0 评论 -
HDU2421Deciphering Password(数论&质因数分解)
Deciphering PasswordTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionXiaoming has just come up with a new way for encryption, by calculat原创 2015-08-28 10:54:19 · 492 阅读 · 0 评论 -
HDU1372 Knight Moves(BFS)
Knight MovesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionA friend of you is doing research on the Traveling Knight Problem (TKP) wher原创 2015-08-16 13:39:20 · 412 阅读 · 0 评论 -
HDU4565 So Easy!(数学+矩阵快速幂)
So Easy!Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem Description A sequence Sn is defined as:Where a, b, n, m are positive integers.┌x┐is原创 2015-08-09 16:44:55 · 370 阅读 · 0 评论 -
POJ1985 Cow Marathon
Cow MarathonTime Limit: 2000MS Memory Limit: 30000KTotal Submissions: 4165 Accepted: 2108Case Time Limit: 1000MSDescriptionAfter hearing about the epidemic原创 2015-08-09 16:20:14 · 450 阅读 · 0 评论 -
HDU1394 Minimum Inversion Number
Minimum Inversion NumberTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionThe inversion number of a given number sequence a1, a2, ..., an原创 2015-08-09 15:38:57 · 260 阅读 · 0 评论 -
POJ2299 Ultra-QuickSort(逆序数问题,树状数组求解)
Ultra-QuickSortTime Limit: 7000MS Memory Limit: 65536KTotal Submissions: 47676 Accepted: 17388DescriptionIn this problem, you have to analyze a particular sorting原创 2015-07-26 21:56:59 · 366 阅读 · 0 评论 -
ZOJ3453 Doraemon's Sweet Bullet(线段树单点更新+区间更新+区间查询)
Doraemon's Sweet BulletTime Limit: 2 Seconds Memory Limit: 65536 KBDoraemon likes to shoot his enemies with sweet bullets.n "enemies" stand in a line, each with a life value li (the ind原创 2015-07-29 19:54:09 · 387 阅读 · 0 评论 -
ZOJ3452 Doraemon's Stone Game
Doraemon's Stone GameTime Limit: 2 Seconds Memory Limit: 65536 KBDoraemon is playing a game with Dorami. Initially there are piles of stones on the table. Each pile consists of at most 2原创 2015-07-29 23:55:35 · 356 阅读 · 0 评论 -
uva 673 Parentheses Balance(栈)
Parentheses BalanceYou are given a string consisting of parentheses () and []. A string of this type is said to be correct:(a)if it is the empty string(b)if A and B are correct, AB is correct,(c原创 2015-08-01 20:10:49 · 321 阅读 · 0 评论 -
Codeforces 115A- Party
A. Partytime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA company has n employees numbered from 1 to n.原创 2015-08-05 16:01:54 · 442 阅读 · 0 评论 -
POJ088滑雪(记忆化搜索|动态规划)
滑雪Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 86673 Accepted: 32434DescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等原创 2016-01-03 22:58:57 · 359 阅读 · 0 评论