摘要: 1.链接地址:http://bailian.openjudge.cn/practice/2756/2.题目:总时间限制:1000ms内存限制:65536kB描述如上图所示,由正整数1, 2, 3, ...组成了一棵无限大的二叉树。从某一个结点到根结点(编号是1的结点)都有一条唯一的路径,比如从10到根结点的路径是(10, 5, 2, 1),从4到根结点的路径是(4, 2, 1),从根结点1到根结点的路径上只包含一个结点1,因此路径就是(1)。对于两个结点x和y,假设他们到根结点的路径分别是(x1, x2, ... ,1)和(y1, y2, ... ,1)(这里显然有x = x1,y = y1) 阅读全文
posted @ 2014-02-13 17:52 mobileliker 阅读(277) 评论(0) 推荐(0)
摘要: 1.链接地址:http://poj.org/problem?id=1094http://bailian.openjudge.cn/practice/10942.题目:Sorting It All OutTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 25547Accepted: 8861DescriptionAn ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to ord 阅读全文
posted @ 2014-02-13 15:47 mobileliker 阅读(279) 评论(0) 推荐(0)
摘要: 1.链接地址:http://bailian.openjudge.cn/practice/2811http://poj.org/problem?id=12222.题目:总时间限制:1000ms内存限制:65536kB描述有一个由按钮组成的矩阵,其中每行有6个按钮,共5行。每个按钮的位置上有一盏灯。当按下一个按钮后,该按钮以及周围位置(上边、下边、左 边、右边)的灯都会改变一次。即,如果灯原来是点亮的,就会被熄灭;如果灯原来是熄灭的,则会被点亮。在矩阵角上的按钮改变3盏灯的状态;在矩阵边上的按 钮改变4盏灯的状态;其他的按钮改变5盏灯的状态。在上图中,左边矩阵中用X标记的按钮表示被按下,右边的矩阵 阅读全文
posted @ 2014-02-13 15:28 mobileliker 阅读(751) 评论(0) 推荐(0)
摘要: 1.链接地址:http://poj.org/problem?id=1083http://bailian.openjudge.cn/practice/1083/2.题目:总时间限制:1000ms内存限制:65536kB描述The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms each on the north side and south ... 阅读全文
posted @ 2014-02-12 22:11 mobileliker 阅读(305) 评论(0) 推荐(0)
摘要: 1.链接地址:http://bailian.openjudge.cn/practice/2810/http://bailian.openjudge.cn/practice/1543/http://poj.org/problem?id=15432.题目:Perfect CubesTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 13190Accepted: 6995DescriptionFor hundreds of years Fermat's Last Theorem, which stated simply that 阅读全文
posted @ 2014-02-12 22:03 mobileliker 阅读(335) 评论(0) 推荐(0)
摘要: 1.链接地址:http://bailian.openjudge.cn/practice/1042/http://poj.org/problem?id=10422.题目:Gone FishingTime Limit: 2000MSMemory Limit: 32768KTotal Submissions: 27652Accepted: 8199DescriptionJohn is going on a fishing trip. He has h hours available (1 = 0 ), is known. Each 5 minutes of fishing decreases the 阅读全文
posted @ 2014-02-12 21:22 mobileliker 阅读(295) 评论(0) 推荐(0)
摘要: 1.链接地址:http://poj.org/problem?id=1013http://bailian.openjudge.cn/practice/2692http://bailian.openjudge.cn/practice/10132.题目:Counterfeit DollarTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 37454Accepted: 11980DescriptionSally Jones has a dozen Voyageur silver dollars. However, only eleven 阅读全文
posted @ 2014-02-12 21:15 mobileliker 阅读(429) 评论(0) 推荐(0)
摘要: 1.链接地址:http://poj.org/problem?id=1017http://bailian.openjudge.cn/practice/10172.题目:总时间限制:1000ms内存限制:65536kB描述一个工厂制造的产品形状都是长方体,它们的高度都是h,长和宽都相等,一共有六个型号,他们的长宽分别为1*1, 2*2, 3*3, 4*4, 5*5, 6*6。这些产品通常使用一个 6*6*h 的长方体包裹包装然后邮寄给客户。因为邮费很贵,所以工厂要想方设法的减小每个订单运送时的包裹数量。他们很需要有一个好的程序帮他们解决这个问题从而节 省费用。现在这个程序由你来设计。输入输入文件包 阅读全文
posted @ 2014-02-12 20:08 mobileliker 阅读(365) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 5 string mul(string str1,string str2) 6 { 7 vector v_res(str1.size()+str2.size(),0); 8 string::size_ty... 阅读全文
posted @ 2014-02-12 19:56 mobileliker 阅读(277) 评论(0) 推荐(0)
摘要: 1.链接地址:http://poj.org/problem?id=1001http://bailian.openjudge.cn/practice/29512.题目:ExponentiationTime Limit: 500MSMemory Limit: 10000KTotal Submissions: 127573Accepted: 31149DescriptionProblems involving the computation of exact values of very large magnitude and precision are common. For example, t 阅读全文
posted @ 2014-02-12 19:55 mobileliker 阅读(318) 评论(0) 推荐(0)