上一页 1 ··· 6 7 8 9 10 11 12 13 14 15 下一页
摘要: DescriptionLong long ago, there was a super computer that could deal with VeryLongIntegers(no VeryLongInteger will be negative). Do you know how this computer stores the VeryLongIntegers? This computer has a set of n positive integers: b1,b2,...,bn, which is called a basis for the computer.The basis 阅读全文
posted @ 2013-01-25 19:54 Joyee 阅读(580) 评论(1) 推荐(0) 编辑
摘要: Description The columnar encryption scheme scrambles the letters in a message (or plaintext) using a keyword as illustrated in the following example: Suppose BATBOY is the keyword and our message is MEET ME BY THE OLD OAK TREE. Since the keyword has 6 letters, we write the message (ignoring spacing 阅读全文
posted @ 2013-01-22 12:31 Joyee 阅读(689) 评论(0) 推荐(0) 编辑
摘要: DescriptionThe rabbits have powerful reproduction ability. One pair of adult rabbits can give birth to one pair of kid rabbits every month. And after ... 阅读全文
posted @ 2013-01-22 10:33 Joyee 阅读(837) 评论(0) 推荐(0) 编辑
摘要: Description歌手The Pancakes到幼儿园跟小朋友玩耍,她到达的时候小朋友们已经争着积木玩了。小朋友都想要更多的积木砌一个自己喜欢的图形,砌完就可以和The Pancakes合照。同时,The Pancakes手上还有一些积木,她可以把手上的这些积木全部给一个小朋友,然后等该小朋友砌完后就可以收回所发的积木和该小朋友原先手上的积木。但她不知道能否让所有的小朋友都和她合照,聪明的你可以帮助她吗?Input输入包含多个数据。每个数据的第一行是两个正整数n和s,1≤n≤10000,1≤s≤1000000,表示一共有n位小朋友,The Pancakes手上有s块积木。以下有n行,每行有 阅读全文
posted @ 2013-01-19 16:02 Joyee 阅读(498) 评论(0) 推荐(0) 编辑
摘要: Description有三根杆子A,B,C。A杆上有n个(n>1)穿孔圆盘,盘的尺寸由下到上依次变小。要求按下列规则将所有圆盘移至C杆:1.每次只能移动一个圆盘;2.大盘不能叠在小盘上面。可将圆盘临时置于B杆,也可将从A杆移出的圆盘重新移回A杆,其间也可借助C杆,但都必须遵循上述两条规则。传说印度某间寺院也有这样三根柱子,上串64个金盘。寺院里的僧侣依照一个古老的预言,以上述规则移动这些盘子;预言说当这些盘子移动完毕,世界就会灭亡。这个传说叫做梵天寺之塔问题(Tower of Brahma puzzle)。可以证明,当盘子的个数为n时,移动的次数最少为2^n – 1,现给出n,并对盘子从 阅读全文
posted @ 2013-01-19 15:48 Joyee 阅读(240) 评论(0) 推荐(0) 编辑
摘要: Description图行变换是计算机图行 学中经常遇到的问题,在计算机中,一个图像通过一些点和它们之间的关系来表示。在这里为了简化问题,我们仅考虑二维图像中的三角形,且只考虑两种变换—— 旋转变换和平移变换。给出一个三角形三个点的坐标和它绕原点逆时针旋转的角度,以及沿x和y方向上平移的距离,求最后三角形各点的坐标。Input输入包括多组测试用例,第一行为一个数T,表示测试用例的个数。对于每组测试用例包括四行,第一行为三个整数r, h, k,分别表示三角形绕原点逆时针旋转的角度,沿x轴移动的距离,沿y轴移动的距离。接下来三行,每行两个数,分别表示三角形的三个点A、B、C的x, y坐标(保证输入 阅读全文
posted @ 2013-01-19 15:43 Joyee 阅读(285) 评论(0) 推荐(0) 编辑
摘要: Description编写一个程序,把一个非负的十进制数转换为任意base(2<=base<=16)进制的数。Input输入包括多组测试用例,通过EOF结束。每组测试用例包含两个数,以空格隔开,第一个为需要转换的十进制数,第二个为转换的进制。Output每组测试用例输出一行,为转换后的数的表示,如果转换后的数的某个数位上的数大于等于10,则分别用A, B, C……来表示。考完机试做了下法师班上的题,发现比我们的作业实用+科学很多啊,囧……一直想写一个这个不过各种拖,期末考也有一题类似的,不过不超过10进制。用了白书上的方法,使用字符串常量来简化输出。 1 #include<s 阅读全文
posted @ 2013-01-19 14:35 Joyee 阅读(213) 评论(0) 推荐(0) 编辑
摘要: DescriptionMo and Larry have devised a way of encrypting messages. They first decide secretly on the number of columns and write the message (letters only) down the columns, padding with extra random letters so as to make a rectangular array of letters. For example, if the message is "There' 阅读全文
posted @ 2012-12-16 19:53 Joyee 阅读(1241) 评论(0) 推荐(0) 编辑
摘要: 模拟赛第二题,难度应该是倒数第三……看样例输入很晕,其实看懂了还是挺简单的,因为没有跨0点的驾驶记录要设计能PASS的测试用例的话会很痛苦……=。=DescriptionLearner drivers need to complete 50 hours of supervised driving with at least 10 hours, or more, of night driving included in the total amount. Each learner must keep a log book of their supervised driving experienc 阅读全文
posted @ 2012-12-11 21:54 Joyee 阅读(311) 评论(0) 推荐(0) 编辑
摘要: 模拟赛最后一题,看懂了也是挺水的,难度算倒数第二了吧……DescriptionThe National Supermarket Chain (NSC) likes to boast that it has the lowest price for mortadella in the country. In fact, if a customer manages to find cheaper mortadella in any other chain, the NSC will match the price for that customer.Matej and Filip decided 阅读全文
posted @ 2012-12-11 21:49 Joyee 阅读(252) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 15 下一页