
codeforces
文章平均质量分 79
清溪浅水
这个作者很懒,什么都没留下…
展开
-
codeforces——A. Counting Sticks
When new students come to the Specialized Educational and Scientific Centre (SESC) they need to start many things from the beginning. Sometimes the teachers say (not always unfairly) that we cannot ev原创 2014-02-21 01:37:20 · 575 阅读 · 0 评论 -
Codeforces Round #244 (Div. 2)——A. Police Recruits(水)
The police department of your city has just started its journey. Initially, they don’t have any manpower. So, they started hiring new recruits in groups.Meanwhile, crimes keeps occurring within th原创 2014-05-05 11:30:58 · 888 阅读 · 0 评论 -
A. Gravity Flip(水 sort)
Little Chris is bored during his physics lessons (too easy), so he has built a toy box to keep himself occupied. The box is special, since it has the ability to change gravity.There are n columns原创 2014-03-27 08:10:14 · 600 阅读 · 0 评论 -
cf——B. Mashmokh and Tokens
Bimokh is Mashmokh's boss. For the following n days he decided to pay to his workers in a new way. At the beginning of each day he will give each worker a certain amount of tokens. Then at the end o原创 2014-04-08 11:54:43 · 780 阅读 · 0 评论 -
cf——A. Mashmokh and Lights
Mashmokh works in a factory. At the end of each day he must turn off all of the lights.The lights on the factory are indexed from 1 to n. There are n buttons in Mashmokh's room indexed from 1 to原创 2014-04-08 11:17:21 · 715 阅读 · 0 评论 -
cf——A. Unusual Product
Little Chris is a huge fan of linear algebra. This time he has been given a homework about the unusual square of a square matrix.The dot product of two integer number vectors x and y of size n i原创 2014-03-27 11:39:31 · 488 阅读 · 0 评论 -
cf——B. Domino Effect
Little Chris knows there's no fun in playing dominoes, he thinks it's too random and doesn't require skill. Instead, he decided to play withthe dominoes and make a "domino show".Chris arranges n d原创 2014-03-27 12:46:35 · 534 阅读 · 0 评论 -
cf——C. Insertion Sort
Petya is a beginner programmer. He has already mastered the basics of the C++ language and moved on to learning algorithms. The first algorithm he encountered was insertion sort. Petya has already wri原创 2014-04-01 15:01:19 · 494 阅读 · 0 评论 -
cf——C. Arithmetic Progression
Everybody knows what an arithmetic progression is. Let us remind you just in case that an arithmetic progression is such sequence of numbers a1, a2, ..., an of length n, that the following condition原创 2014-04-09 20:29:50 · 753 阅读 · 0 评论 -
cf——B. Number Busters
Arthur and Alexander are number busters. Today they've got a competition.Arthur took a group of four integers a, b, w, x (0 ≤ b w, 0 x w) and Alexander took integer с. Arthur and Alexander use d原创 2014-04-09 19:54:20 · 556 阅读 · 0 评论 -
CF——A. Ksenia and Pan Scales
InputThe first line has a non-empty sequence of characters describing the scales. In this sequence, an uppercase English letter indicates a weight, and the symbol "|" indicates the delimiter (th原创 2014-04-09 19:02:25 · 660 阅读 · 0 评论 -
B. Megacity
The administration of the Tomsk Region firmly believes that it's time to become a megacity (that is, get population of one million). Instead of improving the demographic situation, they decided to ach原创 2014-04-27 16:20:42 · 679 阅读 · 0 评论 -
A. Squats
Pasha has many hamsters and he makes them work out. Today, n hamsters (n is even) came to work out. The hamsters lined up and each hamster either sat down or stood up.For another exercise, Pasha原创 2014-04-27 16:02:17 · 704 阅读 · 0 评论 -
cf——A. The Great Game
Two teams meet in The Game World Championship. Some scientists consider this game to be the most intellectually challenging game in the world. You are given two strings describing the teams' actions i原创 2014-04-02 16:02:53 · 605 阅读 · 0 评论 -
A. Valera and X
Valera is a little boy. Yesterday he got a huge Math hometask at school, so Valera didn't have enough time to properly learn the English alphabet for his English lesson. Unfortunately, the English tea原创 2014-03-20 13:45:29 · 673 阅读 · 0 评论 -
A. Slightly Decreasing Permutations
#include #include #include #include using namespace std;int main(){ int n,m; while(scanf("%d%d",&n,&m)!=EOF) { if(m==0) { for(int i=1;i<n;i++)原创 2014-03-31 18:44:00 · 661 阅读 · 0 评论 -
A. Vanya and Cards
Vanya loves playing. He even has a special set of cards to play with. Each card has a single integer. The number on the card can be positive, negative and can even be equal to zero. The only limit is,原创 2014-03-11 15:55:25 · 666 阅读 · 0 评论 -
B. Sereja and Contests
Sereja is a coder and he likes to take part in Codesorfes rounds. However, Uzhland doesn't have good internet connection, so Sereja sometimes skips rounds.Codesorfes has rounds of two types: Div1原创 2014-03-11 16:33:29 · 705 阅读 · 0 评论 -
A. George and Sleep
George woke up and saw the current time s on the digital clock. Besides, George knows that he has slept for time t.Help George! Write a program that will, given time s and t, determine the time原创 2014-03-14 14:47:14 · 626 阅读 · 0 评论 -
C. Hexadecimal's Numbers
One beautiful July morning a terrible thing happened in Mainframe: a mean virus Megabyte somehow got access to the memory of his not less mean sister Hexadecimal. He loaded there a huge amount of n di原创 2014-03-27 16:35:18 · 973 阅读 · 0 评论 -
cf——236——A. Nuts
You have a nuts and lots of boxes. The boxes have a wonderful feature: if you put x (x ≥ 0) divisors (the spacial bars that can divide a box) to it, you get a box, divided into x + 1 sections.Yo原创 2014-03-17 11:10:10 · 598 阅读 · 0 评论 -
A. Kalevitch and Chess
A famous Berland's painter Kalevitch likes to shock the public. One of his last obsessions is chess. For more than a thousand years people have been playing this old game on uninteresting, monotonous原创 2014-03-27 13:06:13 · 1012 阅读 · 0 评论 -
A. Guess a number!(cf)
A TV show called "Guess a number!" is gathering popularity. The whole Berland, the old and the young, are watching the show.The rules are simple. The host thinks of an integer y and the participan原创 2014-04-14 21:23:29 · 640 阅读 · 0 评论 -
cf——H - Vanya and Cards
The Little Elephant has an integer a, written in the binary notation. He wants to write this number on a piece of paper.To make sure that the number a fits on the piece of paper, the Little Elepha原创 2014-03-30 08:48:11 · 596 阅读 · 0 评论 -
cf——B. Garland
Once little Vasya read an article in a magazine on how to make beautiful handmade garland from colored paper. Vasya immediately went to the store and bought n colored sheets of paper, the area of ea原创 2014-03-30 18:31:31 · 679 阅读 · 0 评论 -
cf——A. Down the Hatch!
Everybody knows that the Berland citizens are keen on health, especially students. Berland students are so tough that all they drink is orange juice!Yesterday one student, Vasya and his mates made原创 2014-04-16 19:26:12 · 628 阅读 · 0 评论 -
Coder-Strike 2014 - Qualification Round——A. Password Check
You have probably registered on Internet sites many times. And each time you should enter your invented password. Usually the registration form automatically checks the password's crypt resistance. If原创 2014-04-15 18:54:55 · 755 阅读 · 0 评论 -
cf——C. Triangle(三角形的顶点)
There is a right triangle with legs of length a and b. Your task is to determine whether it is possible to locate the triangle on the plane in such a way that none of its sides is parallel to the co原创 2014-04-01 11:08:32 · 621 阅读 · 0 评论 -
Codeforces Round #243 (Div. 2)——A. Sereja and Mugs
Sereja showed an interesting game to his friends. The game goes like that. Initially, there is a table with an empty cup and n water mugs on it. Then all players take turns to move. During a move, a原创 2014-04-28 20:43:07 · 782 阅读 · 0 评论