摘要: We all love recursion! Don't we?Consider a three-parameter recursive function w(a, b, c):if a 20 or b > 20 or c > 20, then w(a, b, c) returns:w(20, 2... 阅读全文
posted @ 2012-07-30 10:43 calmound 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 从顶到底的最大和是多少#include#includeint main(){ int n,i,j; int a[110][100]; int sum[110]; int ans; while(scanf("%d",&n)!=EOF) { for (i... 阅读全文
posted @ 2012-07-30 09:47 calmound 阅读(143) 评论(0) 推荐(0) 编辑
摘要: uva的题真的很好,每个题都能长许多知识,A了后很开心,这道题我用了两天写,只一道题就学了四个函数,成长不少Problem E: Automatic EditingSource file:autoedit.{c,cpp,java,pas}Input file:autoedit.inOutput fi... 阅读全文
posted @ 2012-07-28 10:02 calmound 阅读(310) 评论(0) 推荐(0) 编辑
摘要: 题意:给几个单词,在给几个句子,输出包含最多单词的那个句子,大小写不分,末尾空行分析:这道题能A,还是挺开心的,但不说多难,而是又学会了个函数,又知道了个细节 这题目还有个问题就是,单词的区分不仅仅靠空格还有其他非字母的符号都可以,如aa.aa 而对于我以前的思路,若ansans这是一个... 阅读全文
posted @ 2012-07-28 09:02 calmound 阅读(145) 评论(0) 推荐(0) 编辑
摘要: sscanf与scanf类似,都是用于输入的,只是后者以键盘(stdin)为输入源,前者以固定字符串为输入源。 第一个参数可以是一个或多个 {%[*] [width] [{h | l | I64 | L}]type | ' ' | '\t' | '\n' | 非%符号} 注: 1、 * ... 阅读全文
posted @ 2012-07-27 13:14 calmound 阅读(242) 评论(0) 推荐(0) 编辑
摘要: http://www.programfan.com/blog/article.asp?id=12763转载在将各种类型的数据构造成字符串时,sprintf的强大功能很少会让你失望。由于sprintf跟printf在用法上几乎一样,只是打印的目的地不同而已,前者打印到字符串中,后者则直接在命令行上输出... 阅读全文
posted @ 2012-07-27 12:53 calmound 阅读(390) 评论(0) 推荐(0) 编辑
摘要: 题目很简单,数组开大就好,5000但加上重复就不够了10000都小,sort排序前闭合后开,对二维字符窜排序用结构体,所以只有一组的时候只是本身但是不会出现RE情况,还有一点 “ ... a”这组数据,若不先判断掉前面的符号就存储, 输出的时候会 a有无谓... 阅读全文
posted @ 2012-07-27 08:18 calmound 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 英语太烂啊。In ``Hangman Judge,'' you are to write a program that judges a series of Hangman games. For each game, the answer to the puzzle is given as well... 阅读全文
posted @ 2012-07-26 10:52 calmound 阅读(503) 评论(0) 推荐(0) 编辑
摘要: 输出结束是EOF,这个害我wa,水题,二进制转换为ascii#include#include#includeint main(){ int i,j; int ans=0,tes; char str[100]; while(gets(str)!=NULL) { ... 阅读全文
posted @ 2012-07-26 08:55 calmound 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 题意:找相同字符窜首字母的地址读题。。。。A word matches a straight, uninterrupted line of letters in the grid.The outputs of two consecutive cases will be separated by a ... 阅读全文
posted @ 2012-07-26 08:04 calmound 阅读(552) 评论(0) 推荐(0) 编辑