随笔分类 -  【UVa】题解

【UVA - 10006 】Carmichael Numbers (快速幂+素数筛法)
摘要:-->Carmichael Numbers Descriptions: 题目很长,基本没用,大致题意如下 给定一个数n,n是合数且对于任意的1 < a < n都有a的n次方模n等于a,这个数就是Carmichael Number. 输出The number n is a Carmichael num 阅读全文

posted @ 2019-07-18 22:44 Sky丨Star 阅读(549) 评论(0) 推荐(0) 编辑

【UVA - 11624】Fire!(bfs)
摘要:-->Fire! 直接上中文 Descriptions: 输入 输出 样例输入 样例输出 题目链接: https://vjudge.net/problem/UVA-11624 注意火不止一个,火是固定的且火走过的地方时间也是一样的,所以可以先把火走的地方需要的时间处理一下,然后再对人bfs,多加一个 阅读全文

posted @ 2019-07-03 11:23 Sky丨Star 阅读(673) 评论(0) 推荐(0) 编辑

【UVA - 1644 / POJ - 3518】Prime Gap(水题)
摘要:Prime Gap 这里直接写中文了 Descriptions: 对于一个数n,若n为素数则输出0,否则找到距离n最小的两个素数,一个大于n,一个小于n,输出他们的差(正数) Input 多组输入 每行包含一个数n 若n为0,程序结束 Output 对于每个测试数据,输出一个答案占一行 Sample 阅读全文

posted @ 2019-06-30 17:28 Sky丨Star 阅读(245) 评论(0) 推荐(0) 编辑

【UVA - 136】Ugly Numbers(set)
摘要:Ugly Numbers Descriptions: Input Output Sample Output 题目链接: https://vjudge.net/problem/UVA-136 不难发现2,3,5之后的丑数全是有这三个数乘上{2,3,5}之后得来的,这就好办了,因为不可重复,还需要按顺序 阅读全文

posted @ 2019-06-09 21:05 Sky丨Star 阅读(417) 评论(0) 推荐(0) 编辑

【UVA - 540】Team Queue (map,队列)
摘要:Team Queue Descriptions: Queues and Priority Queues are data structures which are known to most computer scientists. The Team Queue, however, is not s 阅读全文

posted @ 2019-06-08 22:15 Sky丨Star 阅读(521) 评论(0) 推荐(0) 编辑

【UVA - 156 】Ananagrams (set,map,vector)
摘要:Ananagrams Descriptions: Most crossword puzzle fans are used to anagrams--groups of words with the same letters in different orders--for example OPTS, 阅读全文

posted @ 2019-06-08 21:16 Sky丨Star 阅读(382) 评论(0) 推荐(0) 编辑

【UVA - 10815】Andy's First Dictionary (set)
摘要:Andy's First Dictionary Description 不提英文了 直接上中文大意吧 XY学长刚刚立下了再不过CET就直播xx的flag,为了不真的开启直播模式,XY学长决定好好学习英语。于是他每天都读一篇只包含生词的英语文章,并以自己高达450的智商在一秒钟之内记忆下来。现在给你一 阅读全文

posted @ 2019-06-07 18:23 Sky丨Star 阅读(547) 评论(0) 推荐(0) 编辑

【UVA - 101】The Blocks Problem(vector+模拟)
摘要:The Blocks Problem Descriptions:(英语就不说了,直接上翻译吧) 初始时从左到右有n个木块,编号为0~n-1,要求实现下列四种操作: move a onto b: 把a和b上方的木块全部放回初始的位置,然后把a放到b上面 move a over b: 把a上方的木块全部 阅读全文

posted @ 2019-06-07 17:26 Sky丨Star 阅读(409) 评论(0) 推荐(0) 编辑

【UVA - 10474 】Where is the Marble?(排序)
摘要: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 阅读全文

posted @ 2019-06-07 16:24 Sky丨Star 阅读(558) 评论(0) 推荐(0) 编辑

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8

导航

统计

点击右上角即可分享
微信分享提示