摘要:时间限制:1 秒内存限制:32 兆特殊判题:否提交:2532解决:1331题目描述:读入两个小于100的正整数A和B,计算A+B.需要注意的是:A和B的每一位数字由对应的英文单词给出.输入:测试输入包含若干测试用例,每个测试用例占一行,格式为"A + B =",相邻两字符串有一个空格间隔.当A和B同时为0时输入结束,相应的结果不要输出.输出:对每个测试用例输出1行,即A+B的值.样例输入:one + two =three four + five six =zero seven + eight nine =zero + zero =样例输出:39096来源:2005年浙江大学
阅读全文
摘要:时间限制:1 秒内存限制:32 兆特殊判题:否提交:1249解决:531题目描述:输入n值,使用递归函数,求杨辉三角形中各个位置上的值。输入:一个大于等于2的整型数n输出:题目可能有多组不同的测试数据,对于每组输入数据,按题目的要求输出相应输入n的杨辉三角形。样例输入:6样例输出:1 11 2 11 3 3 11 4 6 4 11 5 10 10 5 1来源:2002年清华大学计算机研究生机试真题(第I套)递归解法: 1 #include<iostream> 2 #include<vector> 3 using namespace std; 4 vector<in
阅读全文
摘要:时间限制:1 秒内存限制:32 兆特殊判题:否提交:2534解决:704题目描述: It is said that in 2011, there are about 100 graduate schools ready to proceed over 40,000 applications in Zhejiang Province. It would help a lot if you could write a program to automate the admission procedure. Each applicant will have to provide two grades
阅读全文
摘要:时间限制:1 秒内存限制:128 兆特殊判题:否提交:367解决:28题目描述:To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share the same sublist if they share the same suffix. For example, "loading" and "being" are stored as sho
阅读全文