![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
简单题
文章平均质量分 84
HaifengQi
这个作者很懒,什么都没留下…
展开
-
C - 字符识别? CSU - 1330
你的任务是写一个程序进行字符识别。别担心,你只需要识别1, 2, 3,如下: .*. *** ***.*. ..* ..*.*. *** ***.*. *.. ..*.*. *** ***Input输入仅包含一组数据,由6行组成。第一行为字符的个数n(1Output输出应包含一行,即识别出的各个字符。Sample Input3原创 2017-08-17 19:40:45 · 465 阅读 · 0 评论 -
长方体
链接:https://www.nowcoder.com/acm/contest/109/A来源:牛客网题目描述给出共享长方体一个顶点的三个面的面积,求它十二条边的边长和。输入描述:一行三个整数a, b, c表示面积(1 <= a, b, c <= 10000)。输出描述:一行一个整数表示边长和。示例1输入1 1 1输出12示例2输入4 6 6输出28#include<iostre...原创 2018-05-06 09:50:02 · 1385 阅读 · 2 评论 -
Balloon Comes!
Problem DescriptionThe contest starts now! How excited it is to see balloons floating around. You, one of the best programmers in HDU, can get a very beautiful balloon if only you have solved the very...原创 2018-05-07 15:58:14 · 334 阅读 · 0 评论 -
齐神与心美的游戏II
链接:https://www.nowcoder.com/acm/contest/127/B来源:牛客网题目描述某一天齐木楠雄和照桥心美又在一起玩找数字的游戏,游戏规则是这样的,桌子上有n个的卡片,每一张卡片上都有一个数字(划重点,这里没有说明每个数字必须独一无二),心美从中选择三次(可以重复选择同一张卡片),然后得到一个数为三张卡片上数字之和,如果卡片上的数字之和恰好为k,那么心美获胜,否则齐神获...原创 2018-06-04 09:11:37 · 406 阅读 · 0 评论 -
Let the Balloon Rise
Problem DescriptionContest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest is ...原创 2018-06-04 21:06:24 · 211 阅读 · 0 评论 -
Big Number
Problem DescriptionIn many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, encryption, etc. In this problem you are gi...原创 2018-06-05 17:44:48 · 1828 阅读 · 0 评论 -
吃糖果
Problem DescriptionHOHO,终于从Speakless手上赢走了所有的糖果,是Gardon吃糖果时有个特殊的癖好,就是不喜欢将一样的糖果放在一起吃,喜欢先吃一种,下一次吃另一种,这样;可是Gardon不知道是否存在一种吃糖果的顺序使得他能把所有糖果都吃完?请你写个程序帮忙计算一下。 Input第一行有一个整数T,接下来T组数据,每组数据占2行,第一行是一个整数N(0<N&l...原创 2018-05-31 18:04:13 · 223 阅读 · 0 评论 -
七夕节
Problem Description七夕节那天,月老来到数字王国,他在城门上贴了一张告示,并且和数字王国的人们说:"你们想知道你们的另一半是谁吗?那就按照告示上的方法去找吧!"人们纷纷来到告示前,都想知道谁才是自己的另一半.告示如下:数字N的因子就是所有比N小又能被N整除的所有正整数,如12的因子有1,2,3,4,6.你想知道你的另一半吗? Input输入数据的第一行是一个数字T(1<=T...原创 2018-05-31 19:51:42 · 392 阅读 · 0 评论 -
小名的回答
链接:https://www.nowcoder.com/acm/contest/127/F来源:牛客网题目描述总算到暑假了,小姐姐是非常的闲,所以想去找梅溪湖的小名玩,可是她从没去过梅溪湖,所以只能凭小名告诉她的地方走,每次只能向上下左右四个方向走1步。小姐姐的坐标为(0,0),小名在(a,b),小姐姐有点近视,小名也有点近视。所以到了(a,b)也不一定能和小名会面,不过还好,小姐姐最后找到了小名...原创 2018-06-02 15:22:25 · 903 阅读 · 0 评论 -
Friend-Graph
Problem DescriptionIt is well known that small groups are not conducive of the development of a team. Therefore, there shouldn’t be any small groups in a good team.In a team with n members,if there...原创 2018-08-18 17:54:47 · 207 阅读 · 0 评论 -
Encoding
DescriptionGiven a string containing only 'A' - 'Z', we could encode it using the following method:1. Each sub-string containing k same characters should be encoded to "kX" where "X" is the only c...原创 2018-08-17 15:32:59 · 192 阅读 · 0 评论 -
Unique Ascending Array
DescriptionGiven an array of integers A[N], you are asked to decide the shortest array of integers B[M], such that the following two conditions hold.For all integers 0 <= i < N, there exists...原创 2018-08-17 15:35:04 · 166 阅读 · 0 评论 -
IP Address
DescriptionSuppose you are reading byte streams from any device, representing IP addresses. Your task is to convert a 32 characters long sequence of '1s' and '0s' (bits) to a dotted decimal format. ...原创 2018-08-17 15:36:43 · 359 阅读 · 0 评论 -
Pet
Problem DescriptionOne day, Lin Ji wake up in the morning and found that his pethamster escaped. He searched in the room but didn’t find the hamster. He tried to use some cheese to trap the hamster....原创 2018-09-12 19:14:10 · 244 阅读 · 0 评论 -
Max Sum
DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5 + 4 = 14....原创 2018-10-15 20:46:15 · 166 阅读 · 0 评论 -
Excuses, Excuses!
DescriptionJudge Ito is having a problem with people subpoenaed for jury duty giving rather lame excuses in order to avoid serving. In order to reduce the amount of time required listening to goofy ...原创 2018-10-10 19:17:06 · 489 阅读 · 0 评论 -
zbj的长跑
Problem C: zbj的长跑Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 139 Solved: 99[Submit][Status][Web Board]Description学校最近规定同学们每天必须参加锻炼,学校的分布为一张图,每两条大路的交点处都有一个打卡器,也就是说在n*m的图中,总共有n*m个打卡器,zbj不喜欢锻...原创 2018-10-23 18:41:11 · 281 阅读 · 0 评论 -
The calculation of GPA
Problem Description每学期的期末,大家都会忙于计算自己的平均成绩,这个成绩对于评奖学金是直接有关的。国外大学都是计算GPA(grade point average) 又称GPR(grade point ratio),即成绩点数与学分的加权平均值来代表一个学生的成绩的。那么如何来计算GPA呢? 一般大学采用之计分法 A90 - 100 4 点 B80 - 89 3 点 C70 - ...原创 2018-05-18 10:08:57 · 347 阅读 · 0 评论 -
采矿
Problem Description某天gameboy玩魔兽RPG。有一个任务是在一个富含金矿的圆形小岛上建一个基地,以最快的速度采集完这个小岛上的所有金矿。这个小岛上有n(0<n<1000000)个金矿,每个金矿的矿藏量是相等的。而且这个小岛的地势非常平坦,所以基地可以建在小岛的任何位置,每个金矿的采矿速度只跟矿藏到基地的路程长度有关。为了不让这个任务太无聊,游戏设计者对这个小岛施...原创 2018-05-09 20:42:37 · 281 阅读 · 0 评论 -
G - 好老师 CSU - 1334
我想当一个好老师,所以我决定记住所有学生的名字。可是不久以后我就放弃了,因为学生太多了,根本记不住。但是我不能让我的学生发现这一点,否则会很没面子。所以每次要叫学生的名字时,我会引用离他最近的,我认得的学生。比如有10个学生:A ? ? D ? ? ? H ? ?想叫每个学生时,具体的叫法是:位置叫法1A2原创 2017-08-17 19:49:27 · 280 阅读 · 0 评论 -
J - 搞笑版费马大定理 CSU - 1337
费马大定理:当n>2时,不定方程an+bn=cn没有正整数解。比如a3+b3=c3没有正整数解。为了活跃气氛,我们不妨来个搞笑版:把方程改成a3+b3=c3,这样就有解了,比如a=4, b=9, c=79时43+93=793。输入两个整数x, y, 求满足xInput输入最多包含10组数据。每组数据包含两个整数x, y(18)。Output对于每组数据,输出解的个数。Sam原创 2017-08-17 20:08:44 · 277 阅读 · 0 评论 -
A - Secrete Master Plan
Master Mind KongMing gave Fei Zhang a secrete master plan stashed in a pocket. The plan instructs how to deploy soldiers on the four corners of the city wall. Unfortunately, when Fei opened the pocket原创 2017-08-18 15:48:46 · 349 阅读 · 0 评论 -
E - Let the Balloon Rise HDU - 1004
Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest is over, they will cou原创 2017-08-06 20:34:21 · 236 阅读 · 0 评论 -
D - Cube painting
输入两个正方体的六个面,看看这两个正方体是否匹配,我们知道,要是两个正方体匹配,只要一个正方体的三个面和另外一个正方体的三个面匹配,那么这两个正方体就匹配,我们首先定义三个数组,一个数组用来存输入字符串,剩下的两个数组,用一个数组的三个面来遍历另外一个数组的六个面。同时用flag来作标识。b[i]==c[j]&&b[5-i]==c[5-j],这就是判断两个正方体是否匹配 ,如果匹配,则有 c[j]='0'; c[5-j]='0';具体详解看代码。原创 2017-08-11 20:36:25 · 361 阅读 · 0 评论 -
I - RunningMan
ZB loves watching RunningMan! There's a game in RunningMan called 100 vs 100.There are two teams, each of many people. There are 3 rounds of fighting, in each round the two teams send some people to原创 2017-08-21 17:05:45 · 210 阅读 · 0 评论 -
B - Symmetry
We call a figure made of points is left-right symmetric as it is possible to fold the sheet of paper along a vertical line and to cut the figure into two identical halves.For example, if a figure exis原创 2017-08-27 19:32:17 · 242 阅读 · 0 评论 -
H - Happy Chinese Poker
Happy Chinese Poker is a Chinese Poker game involved by three players. In each round, there is one player running for the landlord, while the other two players are farmers. The game always ends with t原创 2017-08-27 19:50:48 · 390 阅读 · 0 评论 -
I - Tricky数
小A很喜欢对着别人”233”,然后他发现有很多数字可以提取出他喜欢的233的子序列(一个数字由a[1,2,3...k]k个字符来表示,可以找到a[i]='2',a[j]='3',a[k]='3'保证i0)个子序列,而且保证提取出这k个子序列都是”233”,且不再剩余任何数字。子序列:某个序列的子序列是从最初序列中任意取出一些元素,在不破坏原始的顺序基础上排成的序列。Input第一行原创 2017-08-27 20:04:33 · 381 阅读 · 0 评论 -
A - Automatic Judge
Welcome to HDU to take part in the second CCPC girls’ competition! A new automatic judge system is used for this competition. During the five-hour contest time, you can submit your code to the syste原创 2017-08-28 18:55:56 · 427 阅读 · 0 评论 -
E - Easy Summation
You are encountered with a traditional problem concerning the sums of powers. Given two integers nn and kk. Let f(i)=ikf(i)=ik, please evaluate the sum f(1)+f(2)+...+f(n)f(1)+f(2)+...+f(n). Th原创 2017-08-28 19:14:34 · 396 阅读 · 0 评论 -
A - A
The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 sec原创 2018-02-06 11:46:58 · 452 阅读 · 0 评论 -
L1-011. A-B
本题要求你计算A-B。不过麻烦的是,A和B都是字符串 —— 即从字符串A中把字符串B所包含的字符全删掉,剩下的字符组成的就是字符串A-B。输入格式:输入在2行中先后给出字符串A和B。两字符串的长度都不超过104,并且保证每个字符串都是由可见的ASCII码和空白字符组成,最后以换行符结束。输出格式:在一行中打印出A-B的结果字符串。输入样例:I love GPLT! It's a fun ga...原创 2018-03-14 17:50:49 · 182 阅读 · 0 评论 -
L1-015. 跟奥巴马一起画方块
美国总统奥巴马不仅呼吁所有人都学习编程,甚至以身作则编写代码,成为美国历史上首位编写计算机代码的总统。2014年底,为庆祝“计算机科学教育周”正式启动,奥巴马编写了很简单的计算机代码:在屏幕上画一个正方形。现在你也跟他一起画吧!输入格式:输入在一行中给出正方形边长N(3<=N<=21)和组成正方形边的某种字符C,间隔一个空格。输出格式:输出由给定字符C画出的正方形。但是注意到行间距...原创 2018-03-14 16:58:13 · 184 阅读 · 0 评论 -
L1-042. 日期格式化
世界上不同国家有不同的写日期的习惯。比如美国人习惯写成“月-日-年”,而中国人习惯写成“年-月-日”。下面请你写个程序,自动把读入的美国格式的日期改写成中国习惯的日期。输入格式:输入在一行中按照“mm-dd-yyyy”的格式给出月、日、年。题目保证给出的日期是1900年元旦至今合法的日期。输出格式:在一行中按照“yyyy-mm-dd”的格式给出年、月、日。输入样例:03-15-2017输出样...原创 2018-03-14 17:08:46 · 315 阅读 · 0 评论 -
简易版之最短距离
寒假的时候,ACBOY要去拜访很多朋友,恰巧他所有朋友的家都处在坐标平面的X轴上。ACBOY可以任意选择一个朋友的家开始访问,但是每次访问后他都必须回到出发点,然后才能去访问下一个朋友。比如有4个朋友,对应的X轴坐标分别为1, 2, 3, 4。当ACBOY选择坐标为2的点做为出发点时,则他最终需要的时间为 |1-2|+|2-2|+|3-2|+|4-2| = 4。现在给出N个朋友的坐标,那么ACBO...原创 2018-05-09 20:15:54 · 205 阅读 · 0 评论 -
Toy Army
Problem F: Toy ArmyTime Limit: 2 Sec Memory Limit: 256 MBSubmit: 44 Solved: 41[Submit][Status][Web Board]Descriptiontime limit per test2 secondsmemory limit per test256 megabytesinput...原创 2018-10-23 18:49:17 · 278 阅读 · 1 评论