通用版热身
文章平均质量分 71
通用版热身
sdifv
热情但不谄媚
用功但不功利
善良但坚守观念
展开
-
C - stl 的 map
stl 的 map题目描述夏天来了~~ 好开心啊,呵呵,好多好多水果 ~~ Joe经营着一个不大的水果店.他认为生存之道就是经营最受顾客欢迎的水果.现在他想要一份水果销售情况的明细表,这样Joe就可以很容易掌握所有水果的销售情况了. Iutput第一行正整数N(0Output对于每一组测试数据,请你输出一份排版格式正确(请分析样本输出)的水果销售情况明细表.这份明细表包括所有水果的产地,名称和销原创 2018-02-18 22:19:42 · 228 阅读 · 0 评论 -
B - stl 的 map
stl 的 map题目描述Ignatius is so lucky that he met a Martian yesterday. But he didn’t know the language the Martians use. The Martian gives him a history book of Mars and a dictionary when it leaves. Now Ig原创 2018-02-18 22:02:48 · 305 阅读 · 0 评论 -
O - 叠筐
叠筐题目描述需要的时候,就把一个个大小差一圈的筐叠上去,使得从上往下看时,边筐花色交错。这个工作现在要让计算机来完成,得看你的了。 Iutput输入是一个个的三元组,分别是,外筐尺寸n(n为满足0Output输出叠在一起的筐图案,中心花色与外筐花色字符从内层起交错相叠,多筐相叠时,最外筐的角总是被打磨掉。叠筐与叠筐之间应有一行间隔。Sample Input11 B A 5 @ WSample Ou原创 2018-02-04 11:41:59 · 262 阅读 · 0 评论 -
N - 无限的路
单词数题目描述甜甜从小就喜欢画图画,最近他买了一支智能画笔,由于刚刚接触,所以甜甜只会用它来画直线,于是他就在平面直角坐标系中画出如下的图形: 甜甜的好朋友蜜蜜发现上面的图还是有点规则的,于是他问甜甜:在你画的图中,我给你两个点,请你算一算连接两点的折线长度(即沿折线走的路线长度)吧。Iutput第一个数是正整数N(≤100)。代表数据的组数。 每组数据由四个非负整数组成x1,y1,x2,y原创 2018-02-04 11:34:45 · 243 阅读 · 0 评论 -
F - 空心三角形
空心三角形题目描述把一个字符三角形掏空,就能节省材料成本,减轻重量,但关键是为了追求另一种视觉效果。在设计的过程中,需要给出各种花纹的材料和大小尺寸的三角形样板,通过电脑临时做出来,以便看看效果。 Iutput每行包含一个字符和一个整数n(0Output每个样板三角形之间应空上一行,三角形的中间为空。显然行末没有多余的空格。 Sample InputX 2 A 7 @Sample Output思原创 2018-02-03 00:04:24 · 290 阅读 · 0 评论 -
I - 产生冠军
产生冠军题目描述有一群人,打乒乓球比赛,两两捉对撕杀,每两个人之间最多打一场比赛。 球赛的规则如下: 如果A打败了B,B又打败了C,而A与C之间没有进行过比赛,那么就认定,A一定能打败C。 如果A打败了B,B又打败了C,而且,C又打败了A,那么A、B、C三者都不可能成为冠军。 根据这个规则,无需循环较量,或许就能确定冠军。你的任务就是面对一群比赛选手,在经过了若干场撕杀之后,确定是否原创 2018-02-03 00:14:11 · 237 阅读 · 0 评论 -
A - stl 的 map
stl 的 map题目描述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, t原创 2018-02-18 21:52:18 · 189 阅读 · 0 评论 -
R - Joseph
Joseph题目描述The Joseph’s problem is notoriously known. For those who are not familiar with the original problem: from among n people, numbered 1, 2, …, n, standing in circle every mth is going to be exec原创 2018-02-17 11:02:44 · 253 阅读 · 0 评论 -
U - Long Distance Racing
Long Distance Racing题目描述Bessie is training for her next race by running on a path that includes hills so that she will be prepared for any terrain. She has planned a straight path and wants to run as f原创 2018-02-17 21:25:51 · 244 阅读 · 0 评论 -
V - The Fun Number System
The Fun Number System题目描述In a k bit 2’s complement number, where the bits are indexed from 0 to k-1, the weight of the most significant bit (i.e., in position k-1), is -2^(k-1), and the weight of a bit原创 2018-02-17 21:29:51 · 262 阅读 · 0 评论 -
W - The Circumference of the Circle
The Circumference of the Circle题目描述To calculate the circumference of a circle seems to be an easy task - provided you know its diameter. But what if you don’t? You are given the cartesian coordinates o原创 2018-02-17 21:40:43 · 205 阅读 · 0 评论 -
X - Specialized Four-Digit Numbers
Specialized Four-Digit Numbers题目描述Find and list all four-digit numbers in decimal notation that have the property that the sum of its four digits equals the sum of its digits when represented in hexade原创 2018-02-17 21:46:42 · 198 阅读 · 0 评论 -
Y - A == B ?
A == B ?题目描述Give you two numbers A and B, if A is equal to B, you should print “YES”, or print “NO”.Iutputeach test case contains two numbers A and B. Outputfor each case, if A is equal to B, you shoul原创 2018-02-17 21:49:50 · 288 阅读 · 0 评论 -
Z - A + B Problem II
A + B Problem II题目描述I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. IutputThe first line of the input contains an integer T(1<=T<=20) which原创 2018-02-18 21:43:50 · 167 阅读 · 0 评论 -
O - Dirichlet's Theorem on Arithmetic Progressions
Dirichlet’s Theorem on Arithmetic Progressions题目描述If a and d are relatively prime positive integers, the arithmetic sequence beginning with a and increasing by d, i.e., a, a + d, a + 2d, a + 3d, a + 4d原创 2018-02-17 10:54:03 · 250 阅读 · 0 评论 -
N - Bullseye
Bullseye题目描述A simple dartboard consists of a flat, circular piece of cork with concentric rings drawn on it. Darts are thrown at the board by players in an attempt to hit the center of the dartboard (t原创 2018-02-17 10:48:29 · 250 阅读 · 0 评论 -
M - 枚举答案能不能做?
M - 枚举答案能不能做?题目描述The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resulting val原创 2018-02-17 10:41:08 · 289 阅读 · 0 评论 -
Y - A == B ?
Y - A == B ?题目描述Give you two numbers A and B, if A is equal to B, you should print “YES”, or print “NO”. Iutputeach test case contains two numbers A and B. Outputfor each case, if A is equal to B, you原创 2018-02-06 12:27:35 · 314 阅读 · 0 评论 -
A - The 3n + 1 problem
The 3n + 1 problem题目描述Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property o原创 2018-02-13 23:55:44 · 360 阅读 · 0 评论 -
B - Candy Sharing Game
Candy Sharing Game题目描述A number of students sit in a circle facing their teacher in the center. Each student initially has an even number of pieces of candy. When the teacher blows a whistle, each stude原创 2018-02-13 23:59:16 · 303 阅读 · 0 评论 -
C - Edge
Edge题目描述For products that are wrapped in small packings it is necessary that the sheet of paper containing the directions for use is folded until its size becomes small enough. We assume that a sheet o原创 2018-02-14 00:01:24 · 211 阅读 · 0 评论 -
D - 不容易系列之(3)―― LELE的RPG难题
不容易系列之(3)―― LELE的RPG难题题目描述人称“AC女之杀手”的超级偶像LELE最近忽然玩起了深沉,这可急坏了众多“Cole”(LELE的粉丝,即”可乐”),经过多方打探,某资深Cole终于知道了原因,原来,LELE最近研究起了著名的RPG难题: 有排成一行的n个方格,用红(Red)、粉(Pink)、绿(Green)三色涂每个格子,每格涂一色,要求任何相邻的方格不能同色,且首尾两格也不同色原创 2018-02-14 22:25:26 · 228 阅读 · 0 评论 -
E - A + B
A + B题目描述读入两个小于100的正整数A和B,计算A+B. 需要注意的是:A和B的每一位数字由对应的英文单词给出. Input测试输入包含若干测试用例,每个测试用例占一行,格式为”A + B =”,相邻两字符串有一个空格间隔.当A和B同时为0时输入结束,相应的结果不要输出. Output对每个测试用例输出1行,即A+B的值. Sample Inputone + two = three f原创 2018-02-14 22:28:07 · 502 阅读 · 0 评论 -
E - A + B
A + B题目描述读入两个小于100的正整数A和B,计算A+B. 需要注意的是:A和B的每一位数字由对应的英文单词给出. Input测试输入包含若干测试用例,每个测试用例占一行,格式为”A + B =”,相邻两字符串有一个空格间隔.当A和B同时为0时输入结束,相应的结果不要输出. Output对每个测试用例输出1行,即A+B的值. Sample Inputone + two = three f原创 2018-02-14 22:28:29 · 270 阅读 · 0 评论 -
F - Robot Motion
Robot Motion题目描述A robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are laid down in a grid. The possible instructions are N nor原创 2018-02-14 22:31:34 · 243 阅读 · 0 评论 -
G - 请使用sort
请使用sort题目描述Football is one of the greatest games in the world. Lots of people like to play football. After one season of matches, the header has to calculate the last scores of every team. He is too la原创 2018-02-14 22:35:34 · 357 阅读 · 0 评论 -
H - 请使用sort
请使用sort题目描述Soon after he decided to design a T-shirt for our Algorithm Board on Free-City BBS, XKA found that he was trapped by all kinds of suggestions from everyone on the board. It is indeed a missi原创 2018-02-14 22:37:40 · 368 阅读 · 0 评论 -
I - 辗转相除法求最大公约数
辗转相除法求最大公约数题目描述The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For example, the LCM of 5, 7 and 15 is 10原创 2018-02-14 22:40:09 · 317 阅读 · 0 评论 -
J - Ignatius and the Princess IV
Ignatius and the Princess IV题目描述“OK, you are not too bad, em… But you can never pass the next test.” feng5166 says. “I will tell you an odd number N, and then N integers. There will be a special intege原创 2018-02-14 22:42:00 · 178 阅读 · 0 评论 -
K - next_permutation
next_permutation题目描述Now our hero finds the door to the BEelzebub feng5166. He opens the door and finds feng5166 is about to kill our pretty Princess. But now the BEelzebub has to beat our hero first. f原创 2018-02-14 22:43:51 · 246 阅读 · 0 评论 -
L - Delta-wave
Delta-wave题目描述A triangle field is numbered with successive integers in the way shown on the picture below. The traveller needs to go from the cell with number M to the cell with number N. The traveller原创 2018-02-17 10:40:33 · 404 阅读 · 0 评论 -
Z - A + B Problem II
A + B Problem II题目描述I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. IutputThe first line of the input contains an integer T(1<=T<=20) which原创 2018-02-06 12:16:57 · 185 阅读 · 0 评论