随笔分类 - codeforces
摘要:Description Bear Limak wants to become the largest of bears, or at least to become larger than his brother Bob. Right now, Limak and Bob weigh a and b
阅读全文
摘要:Description You are developing a new feature for the website which sells airline tickets: being able to sort tickets by price! You have already extrac
阅读全文
摘要:Description Input The input consists of four lines, each line containing a single digit 0 or 1. Output Output a single digit, 0 or 1. Example input 01
阅读全文
摘要:Description Input The only line of the input contains a string of digits. The length of the string is between 1 and 10, inclusive. Input The only line
阅读全文
摘要:Description DO YOU EXPECT ME TO FIND THIS OUT? WHAT BASE AND/XOR LANGUAGE INCLUDES string? DON'T BYTE OF MORE THAN YOU CAN CHEW YOU CAN ONLY DISTORT T
阅读全文
摘要:Description Programmers' kids solve this riddle in 5-10 minutes. How fast can you do it? Programmers' kids solve this riddle in 5-10 minutes. How fast
阅读全文
摘要:Description Input The input contains a single integer a (1 ≤ a ≤ 30). Description Input The input contains a single integer a (1 ≤ a ≤ 30). Output Out
阅读全文
摘要:Description T is a complete binary tree consisting of n vertices. It means that exactly one vertex is a root, and each vertex is either a leaf (and do
阅读全文
摘要:Description n children are standing in a circle and playing the counting-out game. Children are numbered clockwise from 1 to n. In the beginning, the
阅读全文
摘要:Description There are n cities situated along the main road of Berland. Cities are represented by their coordinates — integer numbers a1, a2, ..., an.
阅读全文
摘要:Description One of Timofey's birthday presents is a colourbook in a shape of an infinite plane. On the plane n rectangles with sides parallel to coord
阅读全文
摘要:Description Each New Year Timofey and his friends cut down a tree of n vertices and bring it home. After that they paint all the n its vertices, so th
阅读全文
摘要:Description Young Timofey has a birthday today! He got kit of n cubes as a birthday present from his parents. Every cube has a number ai, which is wri
阅读全文
摘要:Description Comrade Dujikov is busy choosing artists for Timofey's birthday and is recieving calls from Taymyr from Ilia-alpinist. Ilia-alpinist calls
阅读全文
摘要:Description For the given sequence with n different elements find the number of increasing subsequences with k + 1 elements. It is guaranteed that the
阅读全文
摘要:Description Pashmak's homework is a problem about graphs. Although he always tries to do his homework completely, he can't solve this problem. As you
阅读全文
摘要:Description Parmida is a clever girl and she wants to participate in Olympiads this year. Of course she wants her partner to be clever too (although h
阅读全文
摘要:Description Recently Pashmak has been employed in a transportation company. The company has kbuses and has a contract with a school which has n studen
阅读全文
摘要:Description Pashmak decided to give Parmida a pair of flowers from the garden. There are n flowers in the garden and the i-th of them has a beauty num
阅读全文
摘要:Description Pashmak has fallen in love with an attractive girl called Parmida since one year ago... Today, Pashmak set up a meeting with his partner i
阅读全文