{"trustable":false,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003e一个环由n个圆圈组成,如图所示。将自然数1、2、...、n分别放入每个圆圈中,相邻圆圈中的数字之和应为素数。\u003cbr\u003e\u003cbr\u003e注意:第一个圆圈中的数字应始终为1。\u003cbr\u003e\u003cbr\u003e\u003cimg style\u003d\"max-width:100%;\" src\u003d\"CDN_BASE_URL/e88bb64cf0e98d017c80d049547a8d34?v\u003d1706976934\"\u003e\u003cbr\u003e\u003c/div\u003e"}},{"title":"输入","value":{"format":"HTML","content":"n (0 \u0026lt; n \u0026lt; 20).\u003cbr\u003e"}},{"title":"输出","value":{"format":"HTML","content":"输出格式如下所示。每一行代表一个环中的圆圈数字序列,顺时针和逆时针开始从1开始。数字的顺序必须满足上述要求。按字典顺序打印解。\u003cbr\u003e\u003cbr\u003e你需要编写一个完成上述过程的程序。\u003cbr\u003e\n\u003cbr\u003e在每个案例后打印一个空行。\u003cstrong\u003e每行数据行末无空格。\u003cbr\u003e"}},{"title":"样例","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e6\n8\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1:\n1 4 3 2 5 6\n1 6 5 2 3 4\n\nCase 2:\n1 2 3 8 5 6 7 4\n1 2 5 8 3 4 7 6\n1 4 7 6 5 8 3 2\n1 6 7 4 3 8 5 2\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}}]}