Even and Odd Combinations

아직 제출이 없습니다시간 제한2초메모리 제한1024 MB

문제

Let a kk-combination out of nn be a kk-element subset of the nn-element set 1,2,,n\\{1, 2, \ldots, n\\}. To denote a combination, list its elements in ascending order. For example, 22-combinations out of 33 look as follows: 1,2\\{1, 2\\}, 1,3\\{1, 3\\}, 2,3\\{2, 3\\}.

Let a combination be even if the number of its elements is an even number, and odd otherwise. For a fixed n>0n > 0, consider two sets: A_nA\_n, the set of all even combinations out of nn, and B_nB\_n, the set of all odd combinations out of nn. It can be shown that A_nA\_n and B_nB\_n contain the same number of combinations.

For each n=1,2,,50n = 1, 2, \ldots, 50, your task is as follows. Construct any bijection (a one-to-one correspondence) between the sets A_nA\_n and B_nB\_n. After that, given an element of one of these sets, print the corresponding element of the other set.