Prime Ring Problem
Time Limit:2000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u
Description
A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime.
Note: the number of first circle should always be 1.
Note: the number of first circle should always be 1.