Codeforces Round #436 (Div. 2), problem: (E) Fire Solution In C/C++

Codeforces Round #436 (Div. 2), problem: (E) Fire Solution In C/C++