自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(30)
  • 收藏
  • 关注

原创 Where is the Marbl

Raju and Meena love to play with Marbles. They have got a lot ofmarbles with numbers written on them. At the beginning, Raju wouldplace the marbles one after another in ascending order of the numbersw...

2018-03-09 19:37:53 194

原创 简单计算器

读入一个只包含 +, -, *, / 的非负整数计算表达式,计算该表达式的值。 Input测试输入包含若干测试用例,每个测试用例占一行,每行不超过200个字符,整数和运算符之间用一个空格分隔。没有非法表达式。当一行中只有0时输入结束,相应的结果不要输出。 Output对每个测试用例输出1行,即该表达式的值,精确到小数点后2位。 Sample Input1 + 24 + 2 * 5 - 7 / 1...

2018-03-09 19:25:30 522

原创 XOR and OR

The Bitlandians are quite weird people. They do everything differently. They have a different alphabet so they have a different definition for a string.A Bitlandish string is a string made only of cha...

2018-03-04 23:14:36 391

原创 Painting Eggs

The Bitlandians are quite weird people. They have very peculiar customs.As is customary, Uncle J. wants to have n eggs painted for Bitruz (an ancient Bitland festival). He has asked G. and A. to do th...

2018-03-04 23:10:25 301

原创 Bit++

The classic programming language of Bitland is Bit++. This language is so peculiar and complicated.The language is that peculiar as it has exactly one variable, called x. Also, there are two operation...

2018-03-04 23:07:14 572

原创 Queue at the School

During the break the schoolchildren, boys and girls, formed a queue of n people in the canteen. Initially the children stood in the order they entered the canteen. However, after a while the boys star...

2018-03-04 23:01:30 393

原创 Stones on the Table

There are n stones on the table in a row, each of them can be red, green or blue. Count the minimum number of stones to take from the table so that any two neighboring stones had different colors. Sto...

2018-03-04 22:59:42 167

原创 Beauty Pageant

General Payne has a battalion of n soldiers. The soldiers' beauty contest is coming up, it will last for k days. Payne decided that his battalion will participate in the pageant. Now he has choose the...

2018-03-04 22:51:39 226

原创 Increase and Decrease

Polycarpus has an array, consisting of n integers a1, a2, ..., an. Polycarpus likes it when numbers in an array match. That's why he wants the array to have as many equal numbers as possible. For that...

2018-03-04 22:45:55 360

原创 Buggy Sorting

Little boy Valera studies an algorithm of sorting an integer array. After studying the theory, he went on to the practical tasks. As a result, he wrote a program that sorts an array of n integers a1, ...

2018-03-04 22:37:14 178

原创 水题

Maxim wants to buy an apartment in a new house at Line Avenue of Metropolis. The house has n apartments that are numbered from 1 to n and are arranged in a row. Two apartments are adjacent if their in...

2018-02-15 22:06:58 127

原创 水题

Petya is a big fan of mathematics, especially its part related to fractions. Recently he learned that a fraction  is called proper iff its numerator is smaller than its denominator (a < b) and that...

2018-02-15 22:05:43 149

原创 水题

One day the Codeforces round author sat exams. He had n exams and he needed to get an integer from 2 to 5 for each exam. He will have to re-sit each failed exam, i.e. the exam that gets mark 2.The aut...

2018-02-15 22:03:54 172

原创 水题

Valeric and Valerko missed the last Euro football game, so they decided to watch the game's key moments on the Net. They want to start watching as soon as possible but the connection speed is too low....

2018-02-15 22:02:29 179

原创 水题

Imp is watching a documentary about cave painting.Some numbers, carved in chaotic order, immediately attracted his attention. Imp rapidly proposed a guess that they are the remainders of division of a...

2018-02-15 21:50:36 211

原创 水题

Anna and Maria are in charge of the math club for junior students. When the club gathers together, the students behave badly. They've brought lots of shoe laces to the club and got tied with each othe...

2018-02-15 21:49:13 261

原创 水题

Imp is in a magic forest, where xorangles grow (wut?)A xorangle of order n is such a non-degenerate triangle, that lengths of its sides are integers not exceeding n, and the xor-sum of the lengths is ...

2018-02-15 21:44:05 203

原创 水题

Olga came to visit the twins Anna and Maria and saw that they have many cookies. The cookies are distributed into bags. As there are many cookies, Olga decided that it's no big deal if she steals a ba...

2018-02-15 21:42:37 275

原创 水题

Imp likes his plush toy a lot.Recently, he found a machine that can clone plush toys. Imp knows that if he applies the machine to an original toy, he additionally gets one more original toy and one co...

2018-02-15 21:39:40 281

原创 水题

Polycarpus has a ribbon, its length is n. He wants to cut the ribbon in a way that fulfils the following two conditions:After the cutting each ribbon piece should have length a, b or c.After the cutti...

2018-02-15 21:38:11 143

原创 水题

One day Vasya heard a story: "In the city of High Bertown a bus number 62 left from the bus station. It had n grown-ups and m kids..."The latter events happen to be of no importance to us. Vasya is an...

2018-02-15 21:32:57 128

原创 水题

Vanya has a scales for weighing loads and weights of masses w0, w1, w2, ..., w100 grams where w is some integer not less than 2 (exactly one weight of each nominal value). Vanya wonders whether he can...

2018-02-15 21:30:56 202

原创 水题

You have n devices that you want to use simultaneously.The i-th device uses ai units of power per second. This usage is continuous. That is, in λ seconds, the device will use λ·ai units of power. The ...

2018-02-15 21:26:25 174

原创 水题

Vanya got an important task — he should enumerate books in the library and label each book with its number. Each of the n books should be assigned with a number from 1 to n. Naturally, distinct books ...

2018-02-15 21:23:54 193

原创 水题

You found a mysterious function f. The function takes two strings s1 and s2. These strings must consist only of lowercase English letters, and must be the same length.The output of the function f is a...

2018-02-15 21:20:25 188

原创 水题

Vanya has a table consisting of 100 rows, each row contains 100 cells. The rows are numbered by integers from 1 to 100 from bottom to top, the columns are numbered from 1 to 100 from left to right.In ...

2018-02-15 21:18:15 95

原创 水题

Tonio has a keyboard with only two letters, "V" and "K".One day, he has typed out a string s with only these two letters. He really likes it when the string "VK" appears, so he wishes to change at mos...

2018-02-15 21:15:19 148

原创 水题

Some dwarves that are finishing the StUDY (State University for Dwarven Youngsters) Bachelor courses, have been told "no genome, no degree". That means that all dwarves should write a thesis on genome...

2018-02-15 21:08:46 266

原创 水题

You are given a string consisting of parentheses () and []. A string of this type is said to be correct:(a) if it is the empty string(b) if A and B are correct, AB is correct,(c) if A is correct, (A) ...

2018-02-15 21:05:24 138

原创 水题

ACboy was kidnapped!! he miss his mother very much and is very scare now.You can't image how dark the room he was put into is, so poor :(.  As a smart ACMer, you want to get ACboy out of the monster's...

2018-02-15 21:00:53 242

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除