上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页
摘要: Problem Description 定义:一个词组中每个单词的首字母的大写组合称为该词组的缩写。 比如,C语言里常用的EOF就是end of file的缩写。 Input 输入的第一行是一个整数T,表示一共有T组测试数据; 接下来有T行,每组测试数据占一行,每行有一个词组,每个词组由一... 阅读全文
posted @ 2015-11-23 12:06 (慎独) 阅读(243) 评论(0) 推荐(0) 编辑
摘要: Problem Description 很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input 本题目包... 阅读全文
posted @ 2015-11-23 11:07 (慎独) 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Problem Description 数论中有许多猜想尚未解决,其中有一个被称为“角谷猜想”的问题,该问题在五、六十年代的美国多个著名高校中曾风行一时,这个问题是这样描述的:任何一个大于一的自然数,如果是奇数,则乘以三再加一;如果是偶数,则除以二;得出的结果继续按照前面的规则进行运算,最后必定... 阅读全文
posted @ 2015-11-20 20:53 (慎独) 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Problem Description You want to processe a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence is sorted i... 阅读全文
posted @ 2015-11-20 11:55 (慎独) 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Problem Description Yifenfei is a romantic guy and he likes to count the stars in the sky. To make the problem easier,we considerate the sky is a tw... 阅读全文
posted @ 2015-11-19 21:33 (慎独) 阅读(162) 评论(0) 推荐(0) 编辑
摘要: Problem Description 输入一行数字,如果我们把这行数字中的‘5’都看成空格,那么就得到一行用空格分割的若干非负整数(可能有些整数以‘0’开头,这些头部的‘0’应该被忽略掉,除非这个整数就是由若干个‘0’组成的,这时这个整数就是0)。 你的任务是:对这些分割得到的整数,依从小到... 阅读全文
posted @ 2015-11-18 13:14 (慎独) 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 描述 南将军手下有N个士兵,分别编号1到N,这些士兵的杀敌数都是已知的。 小工是南将军手下的军师,南将军经常想知道第m号到第n号士兵的总杀敌数,请你帮助小工来回答南将军吧。 南将军的某次询问之后士兵i可能又杀敌q人,之后南将军再询问的时候,需要考虑到新增的杀敌数。 输入只有一组测试数据... 阅读全文
posted @ 2015-11-17 09:52 (慎独) 阅读(202) 评论(0) 推荐(0) 编辑
摘要: Problem Description Given an positive integer A (1 #include #include #include #include #include #include using namespace std;int lowbit(int x){ re... 阅读全文
posted @ 2015-11-16 21:40 (慎独) 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Problem Description N个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a #include #include #include #include #include #include using namespace std;int a[1000... 阅读全文
posted @ 2015-11-16 21:04 (慎独) 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Problem Description 一个正整数,如果从左向右读(称之为正序数)和从右向左读(称之为倒序数)是一样的,这样的数就叫回文数。任取一个正整数,如果不是回文数,将该数与他的倒序数相加,若其和不是回文数,则重复上述步骤,一直到获得回文数为止。例如:68变成154(68+86),再变成6... 阅读全文
posted @ 2015-11-16 13:58 (慎独) 阅读(279) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页