A. Chess Tourney time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Berland annual chess tournament is coming! Organizers have gathered 2·n chess players who should be divided into two teams w…
http://codeforces.com/contest/325/problem/B B. Stadium and Games time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Daniel is organizing a football tournament. He has come up with the followin…
A. Cinema Line time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output The new "Die Hard" movie has just been released! There are n people at the cinema box office standing in a huge line. Ea…
D. Contest Balloons time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output One tradition of ACM-ICPC contests is that a team gets a balloon for every solved problem. We…
D. Vika and Segments time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vika has an infinite sheet of squared paper. Initially all squares are white. She introduced a two-dimensional coordina…
D. The Union of k-Segments time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output You are given n segments on the coordinate axis Ox and the number k. The point is satisfied if it belongs to at l…
B. Tavas and Malekas time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Tavas is a strange creature. Usually "zzz" comes out of people's mouth while sleeping, but string s of length n co…
C. Tavas and Karafs time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Karafs is some kind of vegetable in shape of an 1 × h rectangle. Tavaspolis people love Karafs and they use Karafs in al…