백준 18788 Swapity Swap (USACO February 2020 Bronze 3번)
문제 링크: https://www.acmicpc.net/problem/18788 18788번: Swapity Swap Initially, the order of the cows is $[1,2,3,4,5,6,7]$ from left to right. After the first step of the process, the order is $[1,5,4,3,2,6,7].$ After the second step of the process, the order is $[1,5,7,6,2,3,4]$. Repeating both steps a second time yields t www.acmicpc.net 배열의 처음 상태로 몇번만에 돌아오는지 period를 먼저 계산하고, 실제로 k번을 반복하는 대신 k % ..