障害物の置かれたグリッド上で飛車が2回で移動できる範囲を求める。
$n \times n$ のグリッドの行または列を選択し,すでに塗られているマスに到達するまでマスを塗りつぶすという操作を $q$ 回行い,最終的に塗られていないマスの数を求める.( $n,q \leq 2 \times 10 ^ {5}$ )
Quote saved.
Login to quote this blog
Failed to save quote. Please try again later.
You cannot quote because this article is private.