A. Maze 题目连接: http://codeforces.com/contest/377/problem/A Description Pavel loves grid mazes. A grid maze is an n × m rectangle maze where each cell is either empty, or is a wall. You can go from one cell to another only if both cells are empty and h…
D. Alyona and a tree time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Alyona has a tree with n vertices. The root of the tree is the vertex 1. In each vertex Alyona wrote an positive intege…
D. Developing Game 题目连接: http://www.codeforces.com/contest/377/problem/D Description Pavel is going to make a game of his dream. However, he knows that he can't make it on his own so he founded a development company and hired n workers of staff. Now…
C. Captains Mode 题目连接: http://codeforces.com/contest/377/problem/C Description Kostya is a progamer specializing in the discipline of Dota 2. Valve Corporation, the developer of this game, has recently released a new patch which turned the balance of…
B. Preparing for the Contest 题目连接: http://codeforces.com/contest/377/problem/B Description Soon there will be held the world's largest programming contest, but the testing system still has m bugs. The contest organizer, a well-known university, has n…