the i-th necklace has a brightness ai, where all the ai are pairwise distinct (i.e. all ai are different), the i-th bracelet has a brightness bi, where all the...
The round carousel consists of n figures of animals. Figures are numbered from 1 to n in order of the carousel moving. Thus, after the n-th figure the figure wi...
Mishka is decorating the Christmas tree. He has got three garlands, and all of them will be put on the tree. After that Mishka will switch these garlands on.