摘要: 最常用标准库函数 标准头文件包括: <asset.h> <ctype.h> <errno.h> <float.h> <limits.h> <locale.h> <math.h> <setjmp.h> <signal.h> <stdarg.h> <stddef.h> <stdlib.h> <stdio 阅读全文
posted @ 2016-03-17 22:38 邻家那小孩儿 阅读(321) 评论(0) 推荐(0) 编辑
摘要: Problem Description Do you own an ID card?You must have a identity card number in your family's Household Register. From the ID card you can get specific personal information of everyone. The number... 阅读全文
posted @ 2016-03-17 22:34 邻家那小孩儿 阅读(935) 评论(0) 推荐(0) 编辑
摘要: Problem Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from the book: Tout avait Pair n... 阅读全文
posted @ 2016-03-17 09:32 邻家那小孩儿 阅读(194) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; int main() { int n,k; while(scanf("%d%d",&n,&k)!=-1) { int r=1,l=n,mid,sum=0; while(r<=l) { sum++; ... 阅读全文
posted @ 2016-03-17 08:48 邻家那小孩儿 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Description 在信息检索系统中一个很重要的环节就是关键字符串的查找,从而很多对自己有用的信息。给你一个很长的一段文字, 和一个关键信息字符串,现在要你判断这段文字里面是否有关键字符串。 Input 输入数据有多行,第一行是一个整数n,表示测试实例的个数,后面跟着n行,每行包括一段文字(中间不含空格,长度不超过1000),和一个关键信息字符串(长度不超过10) Outp... 阅读全文
posted @ 2016-03-15 21:08 邻家那小孩儿 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 题目:现代数学的著名证明之一是Georg Cantor证明了有理数是可枚举的。他是用下面这一张表来证明这一命题的: 第一项是1/1,第二项是是1/2,第三项是2/1,第四项是3/1,第五项是2/2,……。输入n,输出第n项。 样例输入: 3 14 7 12345      样例输出: 2/1 2/4 阅读全文
posted @ 2016-03-15 21:02 邻家那小孩儿 阅读(153) 评论(0) 推荐(0) 编辑
摘要: Problem Description Ignatius likes to write words in reverse way. Given a single line of text which is written by Ignatius, you should reverse all the 阅读全文
posted @ 2016-02-21 16:26 邻家那小孩儿 阅读(134) 评论(0) 推荐(0) 编辑
摘要: Problem Description 在足球比赛中,有不少赛事,例如世界杯淘汰赛和欧洲冠军联赛淘汰赛中,当比赛双方经过正规比赛和加时赛之后仍然不分胜负时,需要进行点球大战来决定谁能够获得最终的胜利。点球大战的规则非常简单,两方轮流派出球员罚点球,每方各罚5个。当5轮点球结束以后如果仍然不分胜负,则 阅读全文
posted @ 2016-02-20 19:42 邻家那小孩儿 阅读(438) 评论(0) 推荐(0) 编辑
摘要: Problem Description 反素数就是满足对于任意i(0<i<x),都有g(i)<g(x),(g(x)是x的因子个数),则x为一个反素数。现在给你一个整数区间[a,b],请你求出该区间的x使g(x)最大。 Input 第一行输入n,接下来n行测试数据 输入包括a,b, 1<=a<=b<= 阅读全文
posted @ 2016-02-20 16:43 邻家那小孩儿 阅读(265) 评论(0) 推荐(0) 编辑
摘要: Problem Description 8球是一种台球竞赛的规则。台面上有7个红球、7个黄球以及一个黑球,当然还有一个白球。对于本题,我们使用如下的简化规则:红、黄两名选手轮流用白球击打各自颜色的球,如果将该颜色的7个球全部打进,则这名选手可以打黑球,如果打进则算他胜。如果在打进自己颜色的所有球之前 阅读全文
posted @ 2016-02-20 16:00 邻家那小孩儿 阅读(283) 评论(0) 推荐(0) 编辑