D. Puzzles Barney lives in country USC (United States of Charzeh). USC has n cities numbered from 1 through n and n - 1 roads between them. Cities and roads of USC form a rooted tree (Barney's not sure why it is rooted). Root of the tree is the city…
D. Puzzles time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Barney lives in country USC (United States of Charzeh). USC has n cities numbered from 1 through n and n - 1 roads between them. C…
2018-03-16 http://codeforces.com/problemset/problem/697/C C. Lorenzo Von Matterhorn time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Barney lives in NYC. NYC has infinite number of intersect…
A. Pineapple Incident time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Ted has a pineapple. This pineapple is able to bark like a bulldog! At time t (in seconds) it barks for the first time.…
B. Barnicle time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Barney is standing in a bar and starring at a pretty girl. He wants to shoot her with his heart arrow but he needs to know the di…
A. Pineapple Incident time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Ted has a pineapple. This pineapple is able to bark like a bulldog! At time t (in seconds) it barks for the first time.…
B. Barnicle time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Barney is standing in a bar and starring at a pretty girl. He wants to shoot her with his heart arrow but he needs to know the di…