D. Three Logos Three companies decided to order a billboard with pictures of their logos. A billboard is a big square board. A logo of each company is a rectangle of a non-zero area. Advertisers will…
D. Three Logos Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/581/problem/D Description Three companies decided to order a billboard with pictures of their logos. A billboard is a big square board. A logo of each company is…
Bakery 题目链接: http://codeforces.com/contest/707/problem/B Description Masha wants to open her own bakery and bake muffins in one of the n cities numbered from 1 to n. There are m bidirectional roads, each of whose connects some pair of cities. To bake…
A. Watching a movie time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You have decided to watch the best moments of some movie. There are two buttons on your player: Watch the current minute…
A. Contest time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Misha and Vasya participated in a Codeforces contest. Unfortunately, each of them solved only one problem, though successfully sub…
C. Developing Skills Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/581/problem/C Description Petya loves computer games. Finally a game that he's been waiting for so long came out! The main character of this game has n dif…
B. Luxurious Houses Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/581/problem/B Description The capital of Berland has n multifloor buildings. The architect who built up the capital was very creative, so all the houses wer…
A. Vasya the Hipster Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/581/problem/A Description One day Vasya the Hipster decided to count how many socks he had. It turned out that he had a red socks and b blue socks. Accordi…
水 A - Vasya the Hipster /************************************************ * Author :Running_Time * Created Time :2015/9/28 星期一 16:58:13 * File Name :A.cpp ************************************************/ #include <cstdio> #include <algorithm>…
It's election time in Berland. The favorites are of course parties of zublicanes and mumocrates. The election campaigns of both parties include numerous demonstrations on n main squares of the capital of Berland. Each of the n squares certainly can h…