随笔 - 418  文章 - 0  评论 - 18  阅读 - 132万

随笔分类 -  poj

1 2 下一页
poj 3040 Allowance
摘要:AllowanceTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 1842Accepted: 763DescriptionAs a reward for record milk production, Farmer John has ... 阅读全文
posted @ 2015-05-07 10:58 细雨微光 阅读(379) 评论(0) 推荐(0) 编辑
poj 2567 Code the Tree 河南第七届省赛
摘要:Code the TreeTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 2350Accepted: 906DescriptionA tree (i.e. a connected graph without cycles) with ... 阅读全文
posted @ 2015-05-05 16:39 细雨微光 阅读(386) 评论(0) 推荐(0) 编辑
poj 1011 Sticks
摘要:SticksTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 126238Accepted: 29477DescriptionGeorge took sticks of the same length and cut them rand... 阅读全文
posted @ 2015-05-05 08:32 细雨微光 阅读(278) 评论(0) 推荐(0) 编辑
poj Buy Tickets
摘要:题目链接:http://poj.org/problem?id=2828类似的题目:http://www.cnblogs.com/lovychen/p/3674048.html测试数据:in:40 771 511 332 6940 205231 192431 38900 31492out:77 33 ... 阅读全文
posted @ 2015-04-30 09:17 细雨微光 阅读(349) 评论(0) 推荐(0) 编辑
poj 3017 Cut the Sequence(单调队列优化 )
摘要:题目链接:http://poj.org/problem?id=3017题意:给你一个长度为n的数列,要求把这个数列划分为任意块,每块的元素和小于m,使得所有块的最大值的和最小分析:这题很快就能想到一个DP方程f[i]=min{f[j]+max{a[k]}}(b[i] 2 #include 3 #i... 阅读全文
posted @ 2015-04-26 20:58 细雨微光 阅读(483) 评论(0) 推荐(0) 编辑
poj 1821 Fence(单调队列)
摘要:题目链接:http://poj.org/problem?id=1821题目分析来自:http://blog.csdn.net/tmeteorj/article/details/8684453连续的N块木板,有K个粉刷匠,分别坐在第Si块木板前,每个粉刷匠不能移动位置,且最多能粉刷连续的Li块木板(必... 阅读全文
posted @ 2015-04-24 20:08 细雨微光 阅读(286) 评论(0) 推荐(0) 编辑
poj 1475 Pushing Boxes 推箱子(双bfs)
摘要:题目链接:http://poj.org/problem?id=1475一组测试数据:7 3###.T..S.#B#.........结果://解题思路:先判断盒子的四周是不是有空位,如果有,则判断人是否能到达盒子的那一边,能的话,把盒子推到空位处,然后继续AC代码: 1 //解题思路:先判断盒子的... 阅读全文
posted @ 2015-04-24 12:46 细雨微光 阅读(2001) 评论(0) 推荐(1) 编辑
poj Ping pong LA 4329 (树状数组统计数目)
摘要:Ping pongTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 2302Accepted: 879DescriptionN(3 2 #include 3 #include 4 #include 5 using namespace s... 阅读全文
posted @ 2015-04-21 17:48 细雨微光 阅读(327) 评论(0) 推荐(0) 编辑
POJ 1962-Corporative Network (并查集)
摘要:题目有2种操作, 一种是查询,一种是设置。设置为将u的父亲设置为v,然后他们之间的距离为|u-v|%1000查询为该点到根点的距离用并查集做,做的时候注意维护即可,注意取余操作。代码: 1 #include 2 #include 3 #include 4 using namespace std; 5... 阅读全文
posted @ 2015-04-21 15:34 细雨微光 阅读(260) 评论(0) 推荐(0) 编辑
poj 3666 河南省第七届程序设计D题(山区修路)
摘要:题目大意:给定一个序列,以最小代价将其变成单调不增或单调不减序列,求最小的变动价值;需要用到离散化dp状态转移方程:dp[i][j]=abs(j-w[i])+min(dp[i-1][k]);(k 2 #include 3 #include 4 #include 5 #include 6 using ... 阅读全文
posted @ 2015-04-14 15:34 细雨微光 阅读(473) 评论(0) 推荐(0) 编辑
poj Squares n个点,共能组成多少个正方形 二分 + 哈希
摘要:题目链接:http://poj.org/problem?id=2002测试数据:41 00 11 10 090 01 02 00 21 22 20 11 12 14-2 53 70 05 20有两种解法,第一种用二分查找,第二种用到hash存储:解法一: 1 #include 2 #include ... 阅读全文
posted @ 2015-04-08 12:31 细雨微光 阅读(856) 评论(0) 推荐(0) 编辑
poj2392 Space Elevator(多重背包问题)
摘要:Space ElevatorTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 8569Accepted: 4052DescriptionThe cows are going to space! They plan to achieve ... 阅读全文
posted @ 2014-10-23 10:07 细雨微光 阅读(677) 评论(0) 推荐(0) 编辑
poj1703 Find them, Catch them(并查集的应用)
摘要:Find them, Catch themTime Limit:1000MSMemory Limit:10000KTotal Submissions:32225Accepted:9947DescriptionThe police office in Tadu City decides to say ... 阅读全文
posted @ 2014-10-22 22:07 细雨微光 阅读(326) 评论(0) 推荐(0) 编辑
poj Sudoku(数独) DFS
摘要:SudokuTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 13665Accepted: 6767Special JudgeDescriptionSudoku is a very simple task. A square table... 阅读全文
posted @ 2014-08-01 16:30 细雨微光 阅读(933) 评论(0) 推荐(0) 编辑
poj 3009 Curling 2.0(dfs)
摘要:Curling 2.0Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 11353Accepted: 4804DescriptionOn Planet MM-21, after their Olympic games this year... 阅读全文
posted @ 2014-07-31 19:26 细雨微光 阅读(193) 评论(0) 推荐(0) 编辑
poj 3083 Children of the Candy Corn
摘要:Children of the Candy CornTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 9528Accepted: 4126DescriptionThe cornfield maze is a popular Hallow... 阅读全文
posted @ 2014-07-30 20:23 细雨微光 阅读(1048) 评论(0) 推荐(0) 编辑
poj 3617 Best Cow Line (字符串反转贪心算法)
摘要:Best Cow LineTime Limit:1000MSMemory Limit:65536KTotal Submissions:9284Accepted:2826DescriptionFJ is about to take hisN(1 ≤N≤ 2,000) cows to the annua... 阅读全文
posted @ 2014-07-08 21:57 细雨微光 阅读(931) 评论(0) 推荐(0) 编辑
poj 1636 Prison rearrangement
摘要:Prison rearrangementTime Limit: 3000MSMemory Limit: 10000KTotal Submissions: 2158Accepted: 971DescriptionIn order to lower the risk of riots and escap... 阅读全文
posted @ 2014-04-24 11:31 细雨微光 阅读(968) 评论(0) 推荐(0) 编辑
poj 1182 食物链 并查集的又一个用法
摘要:食物链Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 41584Accepted: 12090Description动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N... 阅读全文
posted @ 2014-04-23 13:16 细雨微光 阅读(259) 评论(0) 推荐(0) 编辑
poj 1611 The Suspects 并查集变形题目
摘要:The SuspectsTime Limit: 1000MSMemory Limit: 20000KTotal Submissions: 20596Accepted: 9998DescriptionSevere acute respiratory syndrome (SARS), an atypic... 阅读全文
posted @ 2014-04-21 21:30 细雨微光 阅读(308) 评论(0) 推荐(0) 编辑

1 2 下一页
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示