#G5015. [GESP202512五级]数字移动

[GESP202512五级]数字移动

Description

image.png

Input Format

image.png

Output Format

输出一行,代表满足要求的 x 的最小值。

6
1 2 1 3 2 3
2

Source

思码特OJ编程训练营 http://127.0.0.1