题目描述
DESCRIPTION
Farmer John has arranged his NNN (1≤N≤5,0001 \leq N \leq 5,0001≤N≤5,000) cows in a row and many of them are facing forward, like good cows. Some of them are facing backward, though, and he needs them all to face forward to make his life perfect.
Fortunately, FJ recently bought an automatic cow turning machine. Since he purchased the discount model, it must be irrevocably preset to turn KKK (1≤K≤N1 \leq K \leq N1≤K≤N) cows at once, and it can only turn cows that are all standi...