IOI 2018 4번) Mechanical Doll
https://www.acmicpc.net/problem/20064 20064번: Mechanical Doll Let M = 4, N = 4, and A = [1, 2, 1, 3]. The grader calls create_circuit(4, [1, 2, 1, 3]). The above figure shows a circuit, which is described by a call answer([1, -1, -2, 0, 2], [2, -2], [3, 1]). The numbers in the figure are the serial numbers of the dev www.acmicpc.net Switch의 성질 관찰 Switch는 다시 초기 상태로 돌아와야 하기 때문에, 공이 짝수 번 들어와야 합니다. ..