B. Views Matter

Quiz

https://codeforces.com/contest/1061/problem/B

AC Code

https://codeforces.com/contest/1061/submission/56446523

参考