考虑将平方看做组合意义:两个人走地形序列相同的路径的方案数。
对于方向的问题,可以将方向分为四类:左、上、左上;右、上、右上;左、下、左下;右、下、右下。
那么一条路径一定是一直走同类方向的。
然而一直向左、上、右、下的路径会被算重,于是再减去即可。
使用记搜实现,否则较难确定转移顺序。
As we are currently experiencing an overwhelming number of web requests for fetching user submissions, we have temporarily disabled the full submissions list. You must now be logged in to view submissions.
Type: Editorial
Status: Open
Posted by: alpha1022
Posted at: 2026-01-28 02:08:20
Last updated: 2026-01-28 02:08:28
考虑将平方看做组合意义:两个人走地形序列相同的路径的方案数。
对于方向的问题,可以将方向分为四类:左、上、左上;右、上、右上;左、下、左下;右、下、右下。
那么一条路径一定是一直走同类方向的。
然而一直向左、上、右、下的路径会被算重,于是再减去即可。
使用记搜实现,否则较难确定转移顺序。