摘要:
上面这种过时了,复杂度高。 下面这种快很多。 费马小定理: 阅读全文
摘要:
H. Special Palindrome A sequence of positive and non-zero integers called palindromic if it can be read the same forward and backward, for example: 15 阅读全文
摘要:
G. The jar of divisors Alice and Bob play the following game. They choose a number N to play with. The rules are as follows: - They write each number 阅读全文
摘要:
F. Contestants Ranking Ahmad is one of the best students in HIAST, and also a very good problems Solver. In the time you will spend reading this probl 阅读全文
摘要:
D. Time to go back You have been out of Syria for a long time, and you recently decided to come back. You remember that you have M friends there and s 阅读全文
摘要:
C. Palindrome Again !! Given string with N characters, your task is to transform it to a palindrome string. It's not as easy as you may think because 阅读全文
摘要:
B. New Job This is the first day for you at your new job and your boss asks you to copy some files from one computer to other computers in an informat 阅读全文
摘要:
Big Event in HDU Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 41952 Accepted Submission(s): 1 阅读全文
摘要:
Coins Time Limit: 3000MS Memory Limit: 30000K Total Submissions: 37856 Accepted: 12852 Description People in Silverland use coins.They have coins of v 阅读全文
摘要:
Dividing Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 26338 Accepted Submission(s): 7523 Probl 阅读全文
摘要:
Description On January 1st 2002, The Netherlands, and several other European countries abandoned their national currency in favour of the Euro. This c 阅读全文
摘要:
最近xhd正在玩一款叫做FATE的游戏,为了得到极品装备,xhd在不停的杀怪做任务。久而久之xhd开始对杀怪产生的厌恶感,但又不得不通过杀怪来升完这最后一级。现在的问题是,xhd升掉最后一级还需n的经验值,xhd还留有m的忍耐度,每杀一个怪xhd会得到相应的经验,并减掉相应的忍耐度。当忍耐度降到0或 阅读全文
摘要:
In the country of ALPC , Xiaoqian is a very famous mathematician. She is immersed in calculate, and she want to use the minimum number of coins in eve 阅读全文
摘要:
有N种物品,每种物品的数量为C1,C2......Cn。从中任选若干件放在容量为W的背包里,每种物品的体积为W1,W2......Wn(Wi为整数),与之相对应的价值为P1,P2......Pn(Pi为整数)。求背包能够容纳的最大价值。 Input 第1行,2个整数,N和W中间用空格隔开。N为物品的 阅读全文
摘要:
电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。 某天,食堂中有n种菜出售,每种菜可购买一次。已知每种菜的价格以及卡上的 阅读全文
摘要:
Charm Bracelet Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 40141 Accepted: 17439 Description Bessie has gone to the mall's jewelry stor 阅读全文
摘要:
在N件物品取出若干件放在容量为W的背包里,每件物品的体积为W1,W2……Wn(Wi为整数),与之相对应的价值为P1,P2……Pn(Pi为整数)。求背包能够容纳的最大价值。 Input 第1行,2个整数,N和W中间用空格隔开。N为物品的数量,W为背包的容量。(1 <= N <= 100,1 <= W 阅读全文
摘要:
1101 换零钱 N元钱换为零钱,有多少不同的换法?币值包括1 2 5分,1 2 5角,1 2 5 10 20 50 100元。 例如:5分钱换为零钱,有以下4种换法: 1、5个1分 2、1个2分3个1分 3、2个2分1个1分 4、1个5分 (由于结果可能会很大,输出Mod 10^9 + 7的结果) 阅读全文