|시간 제한||메모리 제한||제출||정답||맞힌 사람||정답 비율|
|2 초||512 MB||92||58||33||82.500%|
Rock-paper-scissors is a game played between two players, where each player chooses one of three elements: rock, paper or scissors. The rules are simple: rock-beats-scissors, scissors-beats-paper and paper-beats-rock. If the players choose the same element, then they tie. On the television show The Big Bang Theory, Sheldon extended rock-paper-scissors to include two extra elements: Lizard and Spock.
The rules are scissors-cuts-paper, paper-covers-rock, rock-crushes-lizard, lizard-poisons-Spock, Spock-smashes-scissors, scissors-decapitates-lizard, lizard-eats-paper, paper-disproves-Spock, Spock-vaporizes-rock and rock-crushes-scissors.
Sheldon’s setup is valid since each element beats exactly half of the other elements and loses to the remaining half. Whenever the number of elements is odd, it is possible to find a game that satisfies these criteria. Extend the game to n elements.
The input consists of a single line with one integer n (3 ≤ n ≤ 99), which is the number of elements. It is guaranteed that n is odd.
Display one valid extension of rock-paper-scissors to n elements. Display exactly n(n−1)/2 lines containing two integers each, b and c (b ≠ c), indicating that element b beats element c. The elements are numbered 1, 2, . . . , n.
For each pair of distinct elements, x and y, exactly one of ‘x y’ or ‘y x’ should be displayed. The lines may be displayed in any order. If there are multiple solutions, any one will be accepted.
1 2 2 3 3 1
1 2 1 4 2 3 2 4 3 1 3 5 4 3 4 5 5 1 5 2