随笔分类 -  OJ

上一页 1 2 3 4 5 6 7 8 下一页
ACMer
OpenJudge/Poj 1159 Palindrome
摘要:1.链接地址:http://bailian.openjudge.cn/practice/1159/http://poj.org/problem?id=11592.题目:PalindromeTime Limit: 3000MSMemory Limit: 65536KTotal Submissions: 49849Accepted: 17153DescriptionA palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to l 阅读全文
posted @ 2014-02-17 00:19 mobileliker 阅读(215) 评论(0) 推荐(0)
OpenJudge/Poj 1207 The 3n + 1 problem
摘要:1.链接地址:http://bailian.openjudge.cn/practice/1207/http://poj.org/problem?id=12072.题目:总时间限制:1000ms内存限制:65536kB描述Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an algori 阅读全文
posted @ 2014-02-15 22:14 mobileliker 阅读(264) 评论(0) 推荐(0)
OpenJudge/Poj 1005 I Think I Need a Houseboat
摘要:1.链接地址:http://bailian.openjudge.cn/practice/1005/http://poj.org/problem?id=10052.题目:I Think I Need a HouseboatTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 82376Accepted: 35628DescriptionFred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of 阅读全文
posted @ 2014-02-15 22:03 mobileliker 阅读(331) 评论(0) 推荐(0)
OpenJudge/Poj 1163 The Triangle
摘要:1.链接地址:http://bailian.openjudge.cn/practice/1163http://poj.org/problem?id=11632.题目:总时间限制:1000ms内存限制:65536kB描述73 88 1 02 7 4 44 5 2 6 5(Figure 1)Figure 1 shows a number triangle. Write a program that calculates the highest sum of numbers passed on a route that starts at the top an... 阅读全文
posted @ 2014-02-14 16:58 mobileliker 阅读(215) 评论(0) 推荐(0)
Openjudge/Poj 1183 反正切函数的应用
摘要:1.链接地址:http://bailian.openjudge.cn/practice/1183http://poj.org/problem?id=11832.题目:总时间限制:1000ms内存限制:65536kB描述反正切函数可展开成无穷级数,有如下公式(其中0 ab+ac=bc-1令b=a+m,c=a+n==>mn=a^2+1所以m或n必然小于a,且为正整数所以可以直接枚举m的值了,注意计算a*a可能爆longint4.代码: 1 #include 2 #include 3 4 using namespace std; 5 6 int main() 7 { 8 long l... 阅读全文
posted @ 2014-02-14 16:49 mobileliker 阅读(419) 评论(0) 推荐(0)
OpenJudge 2813 画家问题 / Poj 1681 Painter's Problem
摘要:1.链接地址:http://bailian.openjudge.cn/practice/2813http://poj.org/problem?id=16812.题目:总时间限制:1000ms内存限制:65536kB描述有一个正方形的墙,由N*N个正方形的砖组成,其中一些砖是白色的,另外一些砖是黄色的... 阅读全文
posted @ 2014-02-14 16:38 mobileliker 阅读(1010) 评论(0) 推荐(0)
OpenJudge 2747 数字方格
摘要:1.链接地址:http://bailian.openjudge.cn/practice/27472.题目:总时间限制:1000ms内存限制:65536kB描述如上图,有3个方格,每个方格里面都有一个整数a1,a2,a3。已知0 2 3 using namespace std; 4 5 int main() 6 { 7 int t; 8 cin>>t; 9 10 int n;11 int a1,a2,a3;12 int k1,k2;13 while(t--)14 {15 int max = 0;16 c... 阅读全文
posted @ 2014-02-14 16:32 mobileliker 阅读(701) 评论(0) 推荐(0)
OpenJudge/Poj 1125 Stockbroker Grapevine
摘要:1.链接地址:http://poj.org/problem?id=1125http://bailian.openjudge.cn/practice/11252.题目:Stockbroker GrapevineTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 24810Accepted: 13674DescriptionStockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading di 阅读全文
posted @ 2014-02-14 01:06 mobileliker 阅读(260) 评论(0) 推荐(0)
Poj 1054 The Troublesome Frog / OpenJudge 2812 恼人的青蛙
摘要:1.链接地址:http://poj.org/problem?id=1054http://bailian.openjudge.cn/practice/28122.题目:总时间限制:10000ms内存限制:65536kB描述在韩国,有一种小的青蛙。每到晚上,这种青蛙会跳越稻田,从而踩踏稻子。农民在早上看到被踩踏的稻子,希望找到造成最大损害的那只青蛙经过的路径。每只青蛙总是沿着一条直线跳越稻田,而且每次跳跃的距离都相同。如下图所示,稻田里的稻子组成一个栅格,每棵稻子位于一个格点上。而青蛙总是从稻田的一侧跳进稻田,然后沿着某条直线穿越稻田,从另一侧跳出去如下图所示,可能会有多只青蛙从稻田穿越。青蛙的每 阅读全文
posted @ 2014-02-14 00:57 mobileliker 阅读(687) 评论(0) 推荐(0)
OpenJudge 2739 计算对数
摘要:1.链接地址:http://bailian.openjudge.cn/practice/2739/2.题目:总时间限制:1000ms内存限制:65536kB描述给定两个正整数a和b。可以知道一定存在整数x,使得x 2 #include 3 #include 4 #include 5 #include 6 7 using namespace std; 8 9 string mul(string str1,string str2)10 {11 vector v_res(str1.size()+str2.size(),0);12 string::size_type i,... 阅读全文
posted @ 2014-02-14 00:52 mobileliker 阅读(703) 评论(0) 推荐(0)
OpenJudge 2753 菲波那契数列
摘要:1.链接地址:http://bailian.openjudge.cn/practice/27532.题目:总时间限制:1000ms内存限制:65536kB描述菲波那契数列是指这样的数列: 数列的第一个和第二个数都为1,接下来每个数都等于前面2个数之和。给出一个正整数a,要求菲波那契数列中第a个数是多少。输入第1行是测试数据的组数n,后面跟着n行输入。每组测试数据占1行,包括一个正整数a(1 2 3 using namespace std; 4 5 int f(int a) 6 { 7 if(a == 1 || a == 2) return 1; 8 else return... 阅读全文
posted @ 2014-02-13 17:53 mobileliker 阅读(493) 评论(0) 推荐(0)
OpenJudge 2756 二叉树
摘要: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 阅读(280) 评论(0) 推荐(0)
Poj/OpenJudge 1094 Sorting It All Out
摘要: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 阅读(281) 评论(0) 推荐(0)
OpenJudge 2811 熄灯问题 / Poj 1222 EXTENDED LIGHTS OUT
摘要: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 阅读(754) 评论(0) 推荐(0)
OpenJudge/Poj 1083 Moving Tables
摘要: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 阅读(309) 评论(0) 推荐(0)
OpenJudge 2810(1543) 完美立方 / Poj 1543 Perfect Cubes
摘要: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 阅读(342) 评论(0) 推荐(0)
Poj/OpenJudge 1042 Gone Fishing
摘要: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 阅读(297) 评论(0) 推荐(0)
Poj 1013 Counterfeit Dollar / OpenJudge 1013(2692) 假币问题
摘要: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 阅读(435) 评论(0) 推荐(0)
Poj 1017 / OpenJudge 1017 Packets/装箱问题
摘要: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 阅读(367) 评论(0) 推荐(0)
Poj 1001 / OpenJudge 2951 Exponentiation
摘要: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 阅读(319) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 8 下一页