QOJ.ac

QOJ

Time Limit: 2 s Memory Limit: 2048 MB Total points: 25
Statistics

Note: the number of moves ($K$) can be $0$.