上一页 1 ··· 4 5 6 7 8 9 下一页

2015年4月6日

幽默数

摘要: DescriptionA number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18,... 阅读全文

posted @ 2015-04-06 15:53 梦林``ysl 阅读(145) 评论(0) 推荐(0) 编辑

2015年3月30日

字符处理 沼跃鱼

摘要: 这是一道字符处理的问题; 1 #include 2 #include 3 #include 4 #include 5 6 int a[211]; 7 void Find (char *ch1, char *ch3); 8 9 int main ()10 {11 int i, l1... 阅读全文

posted @ 2015-03-30 20:52 梦林``ysl 阅读(218) 评论(0) 推荐(0) 编辑

2015年3月25日

结构体 按出生年月排序

摘要: 题目描述送人玫瑰手有余香,小明希望自己能带给他人快乐,于是小明在每个好友生日的时候发去一份生日祝福。小明希望将自己的通讯录按好友的生日排序排序,这样就查看起来方便多了,也避免错过好友的生日。为了小明的美好愿望,你帮帮他吧。小明的好友信息包含姓名、出生日期。其中出生日期又包含年、月、日三部分信息。输入... 阅读全文

posted @ 2015-03-25 19:43 梦林``ysl 阅读(679) 评论(0) 推荐(0) 编辑

2015年3月18日

两个有序数列的合并

摘要: 题目描述已知数组a中有m个按升序排列的元素,数组b中有n个按降序排列的元素,编程将a与b中的所有元素按降序存入数组c中。输入输入有两行,第一行首先是一个正整数m,然后是m个整数;第二行首先是一个正整数n,然后是n个整数,m, n均小于等于1000000。输出输出合并后的m+n个整数,数据之间用空格隔... 阅读全文

posted @ 2015-03-18 18:00 梦林``ysl 阅读(505) 评论(0) 推荐(0) 编辑

2015年3月17日

大数加法

摘要: 题目描述比利经常会碰到超大整数的加法运算,而普通的计算器上无法进行。因此他想你帮他写一个程序来计算结果。输入输入数据有多组。首先输入一个整数T,表示有T组输入。每组输入有两行,每行一个大整数。每个整数最多1000位。没有负数输入。输出对于每组输入,输出两个整数的和,单独占一行。样例输入2 1 2 1... 阅读全文

posted @ 2015-03-17 19:54 梦林``ysl 阅读(187) 评论(0) 推荐(0) 编辑

2015年1月22日

Common Subsequence---最长公共子序列

摘要: Problem DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = another ... 阅读全文

posted @ 2015-01-22 15:41 梦林``ysl 阅读(248) 评论(0) 推荐(0) 编辑

N个数的全排列 -------指定排头法

摘要: 输入 一个整数N 再输入N个整数输出 N个数的全排代码如下: 1 #include 2 #include 3 #define N 100 4 5 int a[2][N] = {0}; 6 int p[N] = {0}; 7 8 void dfs(int k, int n) 9 {10 i... 阅读全文

posted @ 2015-01-22 11:06 梦林``ysl 阅读(395) 评论(0) 推荐(0) 编辑

2015年1月21日

Oil Deposits----深搜问题

摘要: DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular... 阅读全文

posted @ 2015-01-21 10:41 梦林``ysl 阅读(214) 评论(0) 推荐(0) 编辑

2015年1月20日

Worm

摘要: Description自从见识了平安夜苹果的涨价后,Lele就在他家门口水平种了一排苹果树,共有N棵。突然Lele发现在左起第P棵树上(从1开始计数)有一条毛毛虫。为了看到毛毛虫变蝴蝶的过程,Lele在苹果树旁观察了很久。虽然没有看到蝴蝶,但Lele发现了一个规律:每过1分钟,毛毛虫会随机从一棵树爬... 阅读全文

posted @ 2015-01-20 20:18 梦林``ysl 阅读(174) 评论(0) 推荐(0) 编辑

亲和串

摘要: 1 #include //亲和串的c语言代码 2 #include 3 char s1[200020],s2[100010],s3[200020]; 4 int main() 5 { 6 int l1, l2; 7 while(gets(s1)) 8 { 9 ... 阅读全文

posted @ 2015-01-20 20:17 梦林``ysl 阅读(207) 评论(0) 推荐(0) 编辑

上一页 1 ··· 4 5 6 7 8 9 下一页

导航