随笔分类 -  基础

摘要:Problem Description All you know Goldbach conjecture.That is to say, Every even integer greater than 2 can be expressed as the sum of two primes. Today, skywind present a new conjecture: every even in... 阅读全文
posted @ 2013-09-09 21:47 1002liu 阅读(195) 评论(0) 推荐(0)
摘要:Problem Description (From wikipedia) For binary strings a and b the Hamming distance is equal to the number of ones in a XOR b. For calculating Hamming distance between two strings a and b, they must ... 阅读全文
posted @ 2013-09-09 21:45 1002liu 阅读(277) 评论(0) 推荐(0)
摘要:Problem Description Today is Children's Day. Some children ask you to output a big letter 'N'. 'N' is constituted by two vertical linesand one diagonal. Each pixel of this letter is a character orderl... 阅读全文
posted @ 2013-09-09 21:36 1002liu 阅读(197) 评论(0) 推荐(0)
摘要:Bob有n个正整数,他将这n个整数根据大小划分成两部分。对于小于等于k的整数放在集合A中,其余的放在集合B中。每次他从集合B中取出一个最大的值,将其变成0放入A集合中。然后将A集合中所有的元素都增加a,如果此时A中元素大于k,那么要将该元素放入B中,同时将B集合中剩余的元素都增加b。Bob现在想知道 阅读全文
posted @ 2013-09-05 09:55 1002liu 阅读(271) 评论(0) 推荐(0)
摘要:ZZY很喜欢流行音乐,每周都要跟踪世界各地各种榜单,例如Oricon和Billboard,现在给出每周各个单曲的销量请给出每周的TOP5以及TOP5中各个单曲的浮动情况 量的排名是按照本周销量排名,而不是总销量。 浮动情况则是较上周的排名变动,也就是说即使某单曲本周销量比上周的差,但排名比上周高,也 阅读全文
posted @ 2013-09-05 09:52 1002liu 阅读(264) 评论(0) 推荐(0)
摘要:ZZY有很多爱好~~比如足球、电影、三国杀、A题,而他希望在这些爱好中能收获一些东西~~但是并不是所有爱好对所有目标都是起积极作用的..ZZY十分的困惑..于是列了下自己想获得的收获并且给每个目标设立了最小要达到的权值...并且给自己的爱好对每个收获目标进行了评值..这个值若是负则代表不利于获得某个 阅读全文
posted @ 2013-09-05 09:38 1002liu 阅读(223) 评论(0) 推荐(0)
摘要:Problem Description ZZ自从上大学以来,脑容量就是以SB计算的,这个吃货竟然连算术运算也不会了,可是当今的计算机可是非常强大的,作为ACMer, 几个简单的算术又算得了什么呢?可是该怎么做呢?ZZ只想算简单的加减乘除,由于大脑钝化,ZZ连小数都没有概念了! Input 有多组测试数据,每组测试数据为一个字符串,字符串为合法的算术运算,运算符号只包含+、-、*、/,数据为整数. ... 阅读全文
posted @ 2013-07-23 23:02 1002liu 阅读(302) 评论(0) 推荐(0)
摘要:Problem Description 邮局最近推出了一套纪念邮票,这套邮票共有N张,邮票面值各不相同,按编号顺序为1分,2分,...,N分。小杭是个集邮爱好者,他很喜欢这套邮票,可惜现在他身上只有M分,并不够把全套都买下。他希望尽量买,最好刚好花光所有钱。作为一个集邮爱好者,小杭也不想买的邮票编号断断续续。所以小杭打算买面值a分至b分的b-a+1张连续的邮票,且总价值刚好为M分。你的任务是求出所... 阅读全文
posted @ 2013-06-03 17:45 1002liu 阅读(248) 评论(0) 推荐(0)
摘要:Problem Description DNA (Deoxyribonucleic acid) is founded in every living creature as the storage medium for genetic information. It is comprised of subunits called nucleotides that are strung togeth... 阅读全文
posted @ 2013-06-03 17:42 1002liu 阅读(351) 评论(0) 推荐(0)
摘要:Problem Description Max is the king of the universe, he rules billions of planets. In each planet, there may be several residents. Residents of Max's kingdom will never die, so some of them may be as ... 阅读全文
posted @ 2013-06-03 17:40 1002liu 阅读(196) 评论(0) 推荐(0)
摘要:Problem Description Hunan cuisine is really wonderful! But if you don’t like spicy food, you will feel terrible since it can be hard for you to find any food without hot pepper here. Big Fan is a st... 阅读全文
posted @ 2013-06-03 00:04 1002liu 阅读(201) 评论(0) 推荐(0)
摘要:Problem Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, ... shows the first ... 阅读全文
posted @ 2013-05-28 23:00 1002liu 阅读(145) 评论(0) 推荐(0)
摘要:时间限制: 2000 MS 内存限制: 65535 MB 问题描述 There is a dice with N sides, which are numbered from 1,2,...,n and have the equal possibility to show up when one rolls a dice. Each side has an integer Ai o... 阅读全文
posted @ 2013-05-24 14:42 1002liu 阅读(195) 评论(0) 推荐(0)
摘要:The vast power system is the most complicated man-made system and the greatest engineering innovation in the 20th century. The following diagram shows 阅读全文
posted @ 2013-05-20 22:26 1002liu 阅读(414) 评论(2) 推荐(0)
摘要:MightyHorse is playing a music game called osu!. After playing for several months, MightyHorse discovered the way of calculating score in osu!: 1. Whi 阅读全文
posted @ 2013-05-19 00:12 1002liu 阅读(206) 评论(0) 推荐(0)
摘要:定义括号序列为如下规则序列(字符串): 1 空序列是规则序列;2 如果S是规则序列,那(S)也是规则序列;3 如果A和B都是规则序列,那么AB也是规则序列.例如,下面的字符串都是规则序列:(), (()), ()() , ()(()) , (()())现在有一个合法的括号序列,你的任务是找出该序列“ 阅读全文
posted @ 2013-05-19 00:08 1002liu 阅读(226) 评论(0) 推荐(0)