Y by
The sequence
is a permutation of
. Each time, Alice swaps two neighbouring numbers in the sequence. Her goal is to make any three consecutive numbers in the sequence non-monotone. Find the smallest positive integer
such that Alice can always achieve her goal in at most
swaps.
Remark. A monotonic sequence is either an increasing or decreasing sequence.
proposed by chengbilly




Remark. A monotonic sequence is either an increasing or decreasing sequence.
proposed by chengbilly
This post has been edited 2 times. Last edited by chengbilly, Apr 26, 2025, 1:51 PM