SWUST OJ Delete Numbers(0700)】的更多相关文章

Delete Numbers(0700) Time limit(ms): 1000 Memory limit(kb): 65535 Submission: 1731 Accepted: 373   Description 给定n 位正整数a,去掉其中任意k≤n 个数字后,剩下的数字按原次序排列组成一个新的正整数.对于给定的n位正整数a(n<100) 和正整数k,设计一个算法找出剩下数字组成的新数最小的删数方案. 对于给定的正整数a,编程计算删去k个数字后得到的最小数. Input 第1 行是1…
题目链接:http://acm.swust.edu.cn/problem/code/745255/ Time limit(ms): 1000 Memory limit(kb): 65535   Description 以下方法称为最小代价的字母树:给定一正整数序列,例如:4,1,2,3,在不改变数的位置的条件下把它们相加,并且用括号来标记每一次加法所得到的和. 例如:((4+1)+ (2+3))=((5)+(5))=10.除去原数不4,1,2,3之外,其余都为中间结果,如5,5,10,将中间结果…
题目链接:http://acm.swust.edu.cn/problem/649/ Time limit(ms): 1000 Memory limit(kb): 65535 Consider two teams, Lakers and Celtics, playing a series of NBA Finals until one of the teams wins n games. Assume that the probability of Lakers winning a game is…
NBA Finals(0649) Time limit(ms): 1000 Memory limit(kb): 65535 Submission: 404 Accepted: 128   Description   Consider two teams, Lakers and Celtics, playing a series of NBA Finals until one of the teams wins n games. Assume that the probability of Lak…
解题思路:http://acm.swust.edu.cn/problem/1023/ Time limit(ms): 5000 Memory limit(kb): 65535     Description BH is in a maze,the maze is a matrix,he wants to escape!   Input The input consists of multiple test cases. For each case,the first line contains…
题目链接:http://acm.swust.edu.cn/problem/799/ Time limit(ms): 1000 Memory limit(kb): 10000   Description Butchering Farmer John's cows always yields the best prime rib. You can tell prime ribs by looking at the digits lovingly stamped across them, one by…
题目链接:http://acm.swust.edu.cn/problem/797/ Time limit(ms): 1000 Memory limit(kb): 10000   Description Palindromes are numbers that read the same forwards as backwards. The number 12321 is a typical palindrome. Given a number base B (2 <= B <= 20 base…
题目链接:http://acm.swust.edu.cn/problem/1125/ Time limit(ms): 1000 Memory limit(kb): 65535   Description 哈特13最近在学习数论问题,然后他智商太低,并学不懂.这不,他又碰到不会的题了.题意非常简单: 有n个数字,求出这些数字中两两最大公约数的最大值.你一定要帮助他解决这个问题啊. Input 多组输入,约25组,直到文件末尾.每组数据占2行,第一行为数字个数n,2<=n<=100000第二行即为…
题目链接:http://acm.swust.edu.cn/problem/0234/ Time limit(ms): 1000 Memory limit(kb): 65535   Description You are given a list of number. An integer K is irreducible with respect to the numbers if K cannot be represented as a sum of one or more elements…
题目链接:http://acm.swust.edu.cn/problem/1126/ Time limit(ms): 1000 Memory limit(kb): 65535 上一周里,患有XX症的哈特13成功解决了填数矩阵问题.不知道他这一周又从哪儿弄来一神奇的矩阵,于是逃课潜心研究了一周,终于发现了其中的奥秘:该矩阵有2行.4列,即8个小方块,每个小方块上有一个数字,即:1 2 3 45 6 7 8对于这个神奇的矩阵,有3种变换方式,具体如下:变换A:上下两行数字互换,如上图可变为:5 6…