题解:P9944 [USACO21FEB] Comfortable Cows B

· · 题解

题目传送门 | 更好的体验

思路

由于每次输入 xy 只改变其上下左右的值,所以每次只要更新其相邻的值即可。