- 博客(17)
- 收藏
- 关注
原创 HDU 1005 Number Sequence
解题思路:注意是对7求余,又因为 f[n] 只与f[n-1]与f[n-2]有关,所以当f[n-1]与f[n-2]出现重复时就是一个循环周期出现了,所以这题很好解了,分析一下循环周期的话,f[n-1]与f[n-2]最多49个状态必然出现重复了。
2013-10-31 20:41:04 674
原创 UVA 10943 - How do you add?
Problem A: How do you add?Larry is very bad at math - he usually uses a calculator, which worked well throughout college. Unforunately, he is now struck in a deserted island with his good buddy Ry
2013-10-30 00:33:18 1546
原创 UVA 11137 - Ingenuous Cubrency
Problem I: Ingenuous CubrencyPeople in Cubeland use cubic coins. Not only the unit of currency is called acube but also the coins are shaped like cubes and their values are cubes. Coins with value
2013-10-30 00:19:14 1384
原创 UVA 11388 - GCD LCM
I I U C O N L I N E C O N T E S T 2 0 0 8Problem D: GCD LCMInput: standard inputOutput: standard output The GCD of two positive integers is the larges
2013-10-29 17:20:55 1039
原创 UVA 11889 - Benefit
题目大意:三个数关系 lcm(a,b)=c,已知a和c,求最小的b,没有输出-1解题思路:gcd(a,b)*lcm(a,b)==a*b ,但是注意乘法用 long long
2013-10-29 17:15:09 1388
原创 UVA 11806 - Cheerleaders
CCheerleaders In most professional sporting events, cheerleaders play a major role in entertaining the spectators. Their roles are substantial during breaks and prior to start of pla
2013-10-28 14:05:21 846
原创 UVA 11401 - Triangle Counting
Problem GTriangle CountingInput: Standard InputOutput: Standard Output You are given n rods of length 1, 2…, n. You have to pick any 3 of them & build a triangle. How many distinct triangl
2013-10-28 13:33:30 932
原创 UVA 11538 - Chess Queen
Problem AChess Queen Input: Standard InputOutput: Standard Output You probably know how the game of chess is played and how chess queen operates. Two chess queens are in attacking position w
2013-10-28 08:52:20 1065
原创 HDU 3696 Farm Game (dp+拓扑排序)
Farm GameProblem Description“Farm Game” is one of the most popular games in online community. In the community each player has a virtual farm. The farmer can decide to plant some kinds of cr
2013-10-15 20:55:39 1022
原创 HDU 3694 Fermat Point in Quadrangle (计算几何- 四边形的费马点)
Fermat Point in QuadrangleProblem DescriptionIn geometry the Fermat point of a triangle, also called Torricelli point, is a point such that the total distance from the three vertices of the
2013-10-15 19:42:48 1714
原创 HDU 3697 Selecting courses (贪心)
Selecting coursesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 62768/32768 K (Java/Others)Total Submission(s): 1291 Accepted Submission(s): 313Problem Description A new
2013-10-14 15:26:35 1141
原创 POJ 3835 Columbus's bargain (最短路径 spfa 算法)
Columbus's bargainTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 421 Accepted: 116DescriptionOn the evening of 3 August 1492, Christopher Columbus depa
2013-10-12 14:20:08 1329 1
原创 uva 11729 Commando War
GCommando WarInput: Standard InputOutput: Standard Output “Waiting for orders we held in the wood, word from the front never cameBy evening the sound of the gunfire was mi
2013-10-08 17:17:16 228
原创 uva 11292 Dragon of Loowater (勇者斗恶龙)
Problem C: The Dragon of LoowaterOnce upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem.The shores of Rellau Creek in central Loowater had always been a prime b
2013-10-08 16:59:37 1019
原创 POJ 2817 WordStack (暴力)
WordStackTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2940 Accepted: 1021DescriptionAs editor of a small-town newspaper, you know that a substantial
2013-10-06 16:26:19 1279
原创 HDU 3016 Man Down (线段树+dp)
Man DownTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1391 Accepted Submission(s): 483Problem DescriptionThe Game “Man Down 1
2013-10-05 14:00:05 1079
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人