Cable master poj1064(二分)
摘要:http://poj.org/problem?id=1064 题意:共有n段绳子,要求总共被分为k段。问在符合题意的前提下,每段长最大是多少? #include <iostream> #include <stdio.h> #include <string.h> #include <string> #
阅读全文
posted @
2016-08-24 11:03
不忧尘世不忧心
阅读(144)
推荐(0)
Subsequence poj3061 (二分)
摘要:http://poj.org/problem?id=3061 题意:找出一个连续子序列比m大,求最短符合题意的连续子序列的长度为多少? #include <iostream> #include <stdio.h> #include <string.h> #include <string> #incl
阅读全文
posted @
2016-08-19 11:08
不忧尘世不忧心
阅读(138)
推荐(0)
Ultra-QuickSort POJ 2299(归并排序)
摘要:http://acm.hust.edu.cn/vjudge/contest/124435#problem/D 题意:给出一个长度为n的数列,你每一次可以随意交换其中两个数字的位置。问你至少交换几次,才能使得这个数列是个单调递增数列。 比赛时没做出来,(自然,比赛后也没做出来。。。) 找了度娘后,发现
阅读全文
posted @
2016-07-28 16:33
不忧尘世不忧心
阅读(262)
推荐(0)
Cow Bowling POJ3176(dp)
摘要:http://poj.org/problem?id=3176 题意: 如图所示,呈三角形的往上递推,问你在这过程中最大的和可能是多少? 简单dp #include <iostream> #include <cstdio> #include <stdio.h> #include <string.h>
阅读全文
posted @
2016-07-28 09:20
不忧尘世不忧心
阅读(170)
推荐(0)
Babelfish POJ 2503
摘要:http://acm.hust.edu.cn/vjudge/contest/124435#problem/A 题意:现有两种语言A, B,每行给出的两个单词分别带别每种语言所对照的写法,两个单词当然是同一个意思。然后给出你一个单词(往后的单词也一定是这种语言下(B)的单词), 让你写出另一种语言(A
阅读全文
posted @
2016-07-27 17:02
不忧尘世不忧心
阅读(144)
推荐(0)
Shuffle'm Up POJ 3087
摘要:http://acm.hust.edu.cn/vjudge/contest/121377#problem/G 根据题意模拟即可 #include<stdio.h> #include<string.h> #include<math.h> #include<queue> using namespace
阅读全文
posted @
2016-07-21 10:00
不忧尘世不忧心
阅读(162)
推荐(0)
Ugly Numbers POJ 1338
摘要:题目链接: http://poj.org/problem?id=1338 题意 :只有素数因子 2, 3, 5 的数字才成为丑陋数字,现给出一个数字 N , 求在丑陋数字的序列里, 第N个丑陋数字是多少。 一开始想的简单粗暴, 搞个循环去存储丑陋数字了。。到最后发现输入N=1500的时候, 压根什么
阅读全文
posted @
2016-07-15 21:52
不忧尘世不忧心
阅读(238)
推荐(0)