状态 题号 竞赛题号 标题 1572 A 九鼎之尊(一) 1573 B 九鼎之尊(二) 1453 C 筛法(Sieve Method) 1134 D 亲密数(close numbers) 1030 E 求最大公约数 1106 F 幸运的编号 1128 G 回文质数 1018 H 选太子(select the prince) 1424 I 甲说乙在说谎 1037 J 合并有序数组(Merging sorted array) 1451 K 叙拉古猜长度 …
题目描述 猴子选大王,有N只猴子,从1-N进行编号.它们按照编号的顺时针方向,排成一个圆圈,然后从第一只猴子开始报数.第一只猴子报1,以后每只猴子报的数字都是它前面猴子所报数字加1.如果一只猴子报的数字是M,则该猴子出列,下一只猴子重新从1开始报数.剩下的猴子继续排成一个圆圈报数,直到全部的猴子都出列为止.最后一个出列的猴子胜出. 输入格式 The first line is an integer t, indicating the number of test cases. Then ther…
King's Quest Time Limit: 15000MS Memory Limit: 65536K Case Time Limit: 2000MS Description Once upon a time there lived a king and he had N sons. And there were N beautiful girls in the kingdom and the king knew about each of his sons which of those g…
Language: Default King's Quest Time Limit: 15000MS Memory Limit: 65536K Total Submissions: 7635 Accepted: 2769 Case Time Limit: 2000MS Description Once upon a time there lived a king and he had N sons. And there were N beautiful girls in the king…