摘要:
1.链接地址:http://bailian.openjudge.cn/practice/1664http://poj.org/problem?id=16642.题目:总时间限制:1000ms内存限制:65536kB描述把M个同样的苹果放在N个同样的盘子里,允许有的盘子空着不放,问共有多少种不同的分法?(用K表示)5,1,1和1,5,1 是同一种分法。输入第一行是测试数据的数目t(0 2 #include 3 4 using namespace std; 5 6 int f(int m,int n) 7 { 8 if(n == 1 || m == 0) return 1; 9 ...
阅读全文
posted @ 2014-02-18 22:22
mobileliker
阅读(267)
推荐(0)
摘要:
1.链接地址:http://poj.org/problem?id=1316http://bailian.openjudge.cn/practice/13162.题目:总时间限制:1000ms内存限制:65536kB描述In 1949 the Indian mathematician D.R. Kaprekar discovered a class of numbers called self-numbers. For any positive integer n, define d(n) to be n plus the sum of the digits of n. (The d stand
阅读全文
posted @ 2014-02-18 22:20
mobileliker
阅读(234)
推荐(0)
摘要:
1.链接地址:http://poj.org/problem?id=1458http://bailian.openjudge.cn/practice/1458/2.题目:Common SubsequenceTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 35411Accepted: 14080DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a s
阅读全文
posted @ 2014-02-18 22:18
mobileliker
阅读(242)
推荐(0)
摘要:
1.链接地址:http://bailian.openjudge.cn/practice/1251/http://poj.org/problem?id=12512.题目:总时间限制:1000ms内存限制:65536kB描述 热带岛屿Lagrishan的首领现在面临一个问题:几年前,一批外援资金被用于维护村落之间的道路,但日益繁茂的丛林无情的侵蚀着村民的道路,导致道路维修开销巨大,长老会不得不放弃部分道路的维护。上图左侧图显示的是正在使用道路的简图以及每条路每个月的维修费用(单位为aacms)。现在长老会需要提出一种方案,即需要保证村落之间都可以互相到达,又要将每个月的道路维修费用控制在最小。村.
阅读全文
posted @ 2014-02-17 22:48
mobileliker
阅读(551)
推荐(0)
摘要:
1.链接地址:http://bailian.openjudge.cn/practice/2694/2.题目:总时间限制:1000ms内存限制:65536kB描述逆波兰表达式是一种把运算符前置的算术表达式,例如普通的表达式2 + 3的逆波兰表示法为+ 2 3。逆波兰表达式的优点是运算符之间不必有优先级关系,也不必用括号改变运算次序,例如(2 + 3) * 4的逆波兰表示法为* + 2 3 4。本题求解逆波兰表达式的值,其中运算符包括+ - * /四个。输入输入为一行,其中运算符和运算数之间都用空格分隔,运算数是浮点数。输出输出为一行,表达式的值。可直接用printf("%f\n&quo
阅读全文
posted @ 2014-02-17 22:45
mobileliker
阅读(400)
推荐(0)
摘要:
1.链接地址:http://bailian.openjudge.cn/practice/1226/http://poj.org/problem?id=12262.题目:总时间限制:1000ms内存限制:65536kB描述You are given a number of case-sensitive strings of alphabetic characters, find the largest string X, such that either X, or its inverse can be found as a substring of any of the given strin
阅读全文
posted @ 2014-02-17 00:30
mobileliker
阅读(185)
推荐(0)
摘要:
1 #include 2 3 #define max(a,b) ((a) > (b) ? (a) : (b)) 4 5 int same(char ch1,char ch2) 6 { 7 if(ch1 == ch2) return 1; 8 else return 0; 9 ...
阅读全文
posted @ 2014-02-17 00:22
mobileliker
阅读(190)
推荐(0)
摘要:
1.链接地址:http://bailian.openjudge.cn/practice/1159/http://poj.org/problem?id=11592.题目:PalindromeTime Limit: 3000MSMemory Limit: 65536KTotal Submissions: 49849Accepted: 17153DescriptionA palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to l
阅读全文
posted @ 2014-02-17 00:19
mobileliker
阅读(211)
推荐(0)
摘要:
1.链接地址:http://bailian.openjudge.cn/practice/1207/http://poj.org/problem?id=12072.题目:总时间限制:1000ms内存限制:65536kB描述Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an algori
阅读全文
posted @ 2014-02-15 22:14
mobileliker
阅读(261)
推荐(0)
摘要:
1.链接地址:http://bailian.openjudge.cn/practice/1005/http://poj.org/problem?id=10052.题目:I Think I Need a HouseboatTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 82376Accepted: 35628DescriptionFred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of
阅读全文
posted @ 2014-02-15 22:03
mobileliker
阅读(329)
推荐(0)