int64 count swaps(int[] s) - ioi 2019 › source › tasks › day1 › shoes › chn.pdf · int64...

3
int64 count_swaps(int[] S) count_swaps([2, 1, -1, -2]) Shoes (1 of 3)

Upload: others

Post on 30-May-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: int64 count swaps(int[] S) - IOI 2019 › source › Tasks › Day1 › Shoes › CHN.pdf · int64 count_swaps(int[] S) count_swaps([2, 1, -1, -2]) Shoes (1 of 3) 2 1 -1-2 2-1 1-2

int64count_swaps(int[]S)

count_swaps([2,1,-1,-2])

Shoes (1 of 3)

Page 2: int64 count swaps(int[] S) - IOI 2019 › source › Tasks › Day1 › Shoes › CHN.pdf · int64 count_swaps(int[] S) count_swaps([2, 1, -1, -2]) Shoes (1 of 3) 2 1 -1-2 2-1 1-2

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)

Page 3: int64 count swaps(int[] S) - IOI 2019 › source › Tasks › Day1 › Shoes › CHN.pdf · int64 count_swaps(int[] S) count_swaps([2, 1, -1, -2]) Shoes (1 of 3) 2 1 -1-2 2-1 1-2

count_swaps

Shoes (3 of 3)