Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

F. Forests in Danger
time limit per test
3 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output