Paths to Equality
Define two functions on lattice points:
A path to equality of length for a pair is a sequence , where:
is called the final value.
For example,
This is a path to equality for and is of length with final value . There is no path to equality of with smaller length.
Find the unique path to equality for with smallest odd length. Enter the final value as your answer.
趋等路径
对格点定义如下两个函数:
对于数对,一条长度为的趋等路径是指满足如下条件的序列:
被称为该路径的终值。
例如,
这是数对的一条趋等路径,其长度为,终值为。对于数对,不存在更短的趋等路径。
对于数对,求其长度为奇数的趋等路径中唯一最短的那条,并将其终值作为你的答案。
Gitalking ...