int64 count swaps(int[] s) - ioi 2019 › source › tasks › day1 › shoes › chn.pdf · int64...
TRANSCRIPT
int64count_swaps(int[]S)
count_swaps([2,1,-1,-2])
Shoes (1 of 3)
2 1 -1 -2
2 -1 1 -2
2 -1 -2 1
2 -2 -1 1
-2 2 -1 1
count_swaps([-2,2,2,-2,-2,2])
Shoes (2 of 3)
count_swaps
Shoes (3 of 3)