key to exercises
文章平均质量分 75
Smile__wei
这个作者很懒,什么都没留下…
展开
-
饭卡-背包问题
description 电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。 某天,食堂中有n种菜出售,每种菜可购买一次。已知每种菜的价格以及卡上的余额,问最少可使卡上的余额为多少。 Input多组原创 2017-02-06 18:48:13 · 501 阅读 · 0 评论 -
hdu6124--Euler theorem
Problem DescriptionHazelFan is given two positive integersa,b, and he wants to calculate amodb. But now he forgets the value of b and only remember the value of a, please tell him the numb原创 2017-08-15 13:54:44 · 362 阅读 · 0 评论 -
hdu6106--Classes
Problem DescriptionThe school set up three elective courses, assuming that these courses are A, B, C. N classes of students enrolled in these courses.Now the school wants to count the number of st原创 2017-08-14 19:27:36 · 394 阅读 · 0 评论 -
hdu6098--Inversion
Problem DescriptionGive an array A, the index starts from 1.Now we want to know Bi=maxi∤jAj , i≥2.InputThe first line of the input gives the number of test cases T; T test cases follow.Eac原创 2017-08-14 18:40:26 · 411 阅读 · 0 评论 -
hdu6034--Balala Power!
Problem DescriptionTalented Mr.Tang has n strings consisting of only lower case characters. He wants to charge them with Balala Power (he could change each character ranged froma to z in原创 2017-07-27 20:30:44 · 493 阅读 · 0 评论 -
hdu6047--Maximum Sequence
Problem DescriptionSteph is extremely obsessed with “sequence problems” that are usually seen on magazines: Given the sequence 11, 23, 30, 35, what is the next number? Steph always finds them too ea原创 2017-07-28 21:40:06 · 654 阅读 · 2 评论 -
hdu6055--Regular polygon
Problem DescriptionOn a two-dimensional plane, give you n integer points. Your task is to figure out how many different regular polygon these points can make.InputThe input file consists of seve原创 2017-07-28 11:04:00 · 372 阅读 · 0 评论 -
acm省赛--D sum of power快速幂
Problem DescriptionCalculate mod (1000000000+7) for givenn,m.InputInput contains two integers n,m(1≤n≤1000,0≤m≤10).OutputOutput the answer in a single line.Example Input原创 2017-07-25 11:12:48 · 359 阅读 · 0 评论 -
acm省赛K题--01背包
DescriptionLYD loves codeforces since there are many Russian contests. In an contest lasting forT minutes there are n problems, and for the ith problem you can getai−di∗ti points, where ai ind原创 2017-07-24 19:41:36 · 393 阅读 · 0 评论 -
acm省赛题--J company
Problem DescriptionThere are n kinds of goods in the company, with each of them has a inventory of and direct unit benefit. Now you find due to price changes, for any goods sold on dayi, if原创 2017-07-24 20:26:10 · 654 阅读 · 0 评论 -
The Pilots Brothers' refrigerator高效贪心算法
DescriptionThe game “The Pilots Brothers: following the stripy elephant” has a quest where a player needs to open a refrigerator.There are 16 handles on the refrigerator door. Every handle can b原创 2017-02-08 21:02:24 · 503 阅读 · 0 评论 -
SDNU1185统计数字
Description某次科研调查时得到了n个自然数,每个数均不超过1500000000(1.5*109)。已知不相同的数不超过10000个,现在需要统计这些自然数各自出现的次数,并按照自然数从小到大的顺序输出统计结果。Input输入包含n+1行;第一行是整数n,表示自然数的个数,1第2~n+1每行一个自然数,每个数均不超过1 500 000 000原创 2017-01-24 18:13:23 · 515 阅读 · 0 评论 -
Filp Game
Description Flip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the other one is black and each piece is lying原创 2017-02-07 20:54:54 · 441 阅读 · 0 评论 -
bookshelf-01背包问题
desriptionFarmer John recently bought another bookshelf for the cow library, but the shelf is getting filled up quite quickly, and now the only available space is at the top.FJ has N cows原创 2017-02-06 19:20:19 · 349 阅读 · 0 评论 -
hdu6130--Kolakoski
Problem DescriptionThis is Kolakosiki sequence:1,2,2,1,1,2,1,2,2,1,2,2,1,1,2,1,1,2,2,1……. This sequence consists of 1 and 2, and its first term equals 1. Besides, if you see adjacent and e原创 2017-08-15 14:00:00 · 365 阅读 · 0 评论