摘要:-->Carmichael Numbers Descriptions: 题目很长,基本没用,大致题意如下 给定一个数n,n是合数且对于任意的1 < a < n都有a的n次方模n等于a,这个数就是Carmichael Number. 输出The number n is a Carmichael num
阅读全文
摘要:-->Fire! 直接上中文 Descriptions: 输入 输出 样例输入 样例输出 题目链接: https://vjudge.net/problem/UVA-11624 注意火不止一个,火是固定的且火走过的地方时间也是一样的,所以可以先把火走的地方需要的时间处理一下,然后再对人bfs,多加一个
阅读全文
摘要:Prime Gap 这里直接写中文了 Descriptions: 对于一个数n,若n为素数则输出0,否则找到距离n最小的两个素数,一个大于n,一个小于n,输出他们的差(正数) Input 多组输入 每行包含一个数n 若n为0,程序结束 Output 对于每个测试数据,输出一个答案占一行 Sample
阅读全文
摘要:Ugly Numbers Descriptions: Input Output Sample Output 题目链接: https://vjudge.net/problem/UVA-136 不难发现2,3,5之后的丑数全是有这三个数乘上{2,3,5}之后得来的,这就好办了,因为不可重复,还需要按顺序
阅读全文
摘要:Team Queue Descriptions: Queues and Priority Queues are data structures which are known to most computer scientists. The Team Queue, however, is not s
阅读全文
摘要:Ananagrams Descriptions: Most crossword puzzle fans are used to anagrams--groups of words with the same letters in different orders--for example OPTS,
阅读全文
摘要:Andy's First Dictionary Description 不提英文了 直接上中文大意吧 XY学长刚刚立下了再不过CET就直播xx的flag,为了不真的开启直播模式,XY学长决定好好学习英语。于是他每天都读一篇只包含生词的英语文章,并以自己高达450的智商在一秒钟之内记忆下来。现在给你一
阅读全文
摘要:The Blocks Problem Descriptions:(英语就不说了,直接上翻译吧) 初始时从左到右有n个木块,编号为0~n-1,要求实现下列四种操作: move a onto b: 把a和b上方的木块全部放回初始的位置,然后把a放到b上面 move a over b: 把a上方的木块全部
阅读全文
摘要:Where is the Marble? Descriptions: Raju and Meena love to play with Marbles. They have got a lot of marbles with numbers written on them. At the begin
阅读全文