Ostap and Partners Time limit: 2.0 secondMemory limit: 64 MB Workman Ivan lost his job. Not because of truancy or being late, and not because the plant where he had been working was left without orders. The reason for dismissal was the stale aspic he…
A. Ostap and Grasshopper 题面 On the way to Rio de Janeiro Ostap kills time playing with a grasshopper he took with him in a special box. Ostap builds a line of length n such that some cells of this line are empty and some contain obstacles. Then, he p…
E. Ostap and Tree time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Ostap already settled down in Rio de Janiero suburb and started to grow a tree in his garden. Recall that a tree is a conn…
A. Ostap and Grasshopper time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output On the way to Rio de Janeiro Ostap kills time playing with a grasshopper he took with him in a special box. Ostap b…
Discription Ostap already settled down in Rio de Janiero suburb and started to grow a tree in his garden. Recall that a tree is a connected undirected acyclic graph. Ostap's tree now has n vertices. He wants to paint some vertices of the tree black s…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output On the way to Rio de Janeiro Ostap kills time playing with a grasshopper he took with him in a special box. Ostap builds a line of length n such…