codeforces
zhaoluwei
人生如棋,我愿为卒。行走虽慢,可谁曾见我后退一步。
展开
-
Launch of Collider
DescriptionThere will be a launch of a new, powerful and unusual collider very soon, which located along a straight line. n particles will be launched inside it. All of them are located in a s原创 2016-08-15 19:37:49 · 245 阅读 · 0 评论 -
Ohana Cleans Up
DescriptionOhana Matsumae is trying to clean a room, which is divided up into an n by n grid of squares. Each square is initially either clean or dirty. Ohana can sweep her broom over columns原创 2016-08-22 20:10:18 · 238 阅读 · 0 评论 -
Bear and Reverse Radewoosh
DescriptionLimak and Radewoosh are going to compete against each other in the upcoming algorithmic contest. They are equally skilled but they won't solve problems in the same order.There will原创 2016-08-22 20:12:54 · 244 阅读 · 0 评论 -
Bear and Three Balls
DescriptionLimak is a little polar bear. He has n balls, the i-th ball has size ti.Limak wants to give one ball to each of his three friends. Giving gifts isn't easy — there are two rules Lima原创 2016-08-22 20:16:12 · 251 阅读 · 0 评论 -
Alice, Bob, Two Teams
DescriptionAlice and Bob are playing a game. The game involves splitting up game pieces into two teams. There are n pieces, and the i-th piece has a strength pi.The way to split up game piec原创 2016-08-22 20:24:24 · 286 阅读 · 0 评论 -
Dima and Guards
DescriptionNothing has changed since the last round. Dima and Inna still love each other and want to be together. They've made a deal with Seryozha and now they need to make a deal with the dorm原创 2016-08-22 20:30:35 · 205 阅读 · 0 评论 -
Hulk
DescriptionDr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely talk when he turns into the incredible Hulk. That's why he asked you to help him to express his f原创 2016-08-11 16:44:07 · 488 阅读 · 0 评论 -
Spider Man
DescriptionPeter Parker wants to play a game with Dr. Octopus. The game is about cycles. Cycle is a sequence of vertices, such that first one is connected with the second, second is connected wi原创 2016-08-11 16:49:20 · 212 阅读 · 0 评论 -
Mishka and trip
DescriptionLittle Mishka is a great traveller and she visited many countries. After thinking about where to travel this time, she chose XXX — beautiful, but little-known northern country.Here ar原创 2016-08-12 17:06:10 · 304 阅读 · 0 评论 -
New Year Transportation
DescriptionNew Year is coming in Line World! In this world, there are n cells numbered by integers from 1 to n, as a 1 × n board. People live in cells. However, it was hard to move between disti原创 2016-09-23 14:30:06 · 375 阅读 · 0 评论 -
Co-prime Array
DescriptionYou are given an array of n elements, you must make it a co-prime array in as few moves as possible.In each move you can insert any positive integral number you want not greater tha原创 2016-08-22 20:04:49 · 328 阅读 · 0 评论 -
Lovely Palindromes
DescriptionPari has a friend who loves palindrome numbers. A palindrome number is a number that reads the same forward or backward. For example12321, 100001 and 1 are palindrome numbers, while原创 2016-08-18 16:06:24 · 346 阅读 · 0 评论 -
Opponents
DescriptionArya has n opponents in the school. Each day he will fight with all opponents who are present this day. His opponents have some fighting plan that guarantees they will win, but impl原创 2016-08-18 16:02:01 · 1176 阅读 · 0 评论 -
One Bomb
DescriptionYou are given a description of a depot. It is a rectangular checkered field of n × m size. Each cell in a field can be empty (".") or it can be occupied by a wall ("*").You have o原创 2016-08-15 19:46:03 · 268 阅读 · 0 评论 -
Vacations
DescriptionVasya has n days of vacations! So he decided to improve his IT skills and do sport. Vasya knows the following information about each of this n days: whether that gym opened and whet原创 2016-08-15 19:53:45 · 246 阅读 · 0 评论 -
Cards
DescriptionThere are n cards (n is even) in the deck. Each card has a positive integer written on it. n / 2 people will play new card game. At the beginning of the game each player gets two ca原创 2016-08-15 19:57:34 · 858 阅读 · 0 评论 -
Cells Not Under Attack
DescriptionVasya has the square chessboard of size n × n and m rooks. Initially the chessboard is empty. Vasya will consequently put the rooks on the board one after another.The cell of the原创 2016-08-15 20:12:51 · 420 阅读 · 0 评论 -
Pineapple Incident
DescriptionTed has a pineapple. This pineapple is able to bark like a bulldog! At time t (in seconds) it barks for the first time. Then every s seconds after it, it barks twice with 1 second int原创 2016-08-16 21:34:07 · 476 阅读 · 0 评论 -
Barnicle
DescriptionBarney is standing in a bar and starring at a pretty girl. He wants to shoot her with his heart arrow but he needs to know the distance between him and the girl to make his shot accurat原创 2016-08-16 21:39:16 · 363 阅读 · 0 评论 -
Mike and Cellphone
DescriptionWhile swimming at the beach, Mike has accidentally dropped his cellphone into the water. There was no worry as he bought a cheap replacement phone with an old-fashioned keyboard. The原创 2016-08-18 09:48:59 · 487 阅读 · 0 评论 -
Mike and Shortcuts
DescriptionRecently, Mike was very busy with studying for exams and contests. Now he is going to chill a bit by doing some sight seeing in the city.City consists of n intersections numbered fr原创 2016-08-18 09:59:49 · 574 阅读 · 0 评论 -
Pouring Rain
DescriptionA lot of people in Berland hates rain, but you do not. Rain pacifies, puts your thoughts in order. By these years you have developed a good tradition — when it rains, you go on the st原创 2016-08-06 21:10:08 · 303 阅读 · 0 评论 -
New Year Permutation
DescriptionUser ainta has a permutation p1, p2, ..., pn. As the New Year is coming, he wants to make his permutation as pretty as possible.Permutation a1, a2, ..., an is prettier than permut原创 2016-09-23 21:41:27 · 438 阅读 · 0 评论