poj训练计划
文章平均质量分 80
drrrrrrrrr
这个作者很懒,什么都没留下…
展开
-
POJ-1753(递归枚举)
题目链接:http://poj.org/problem?id=1753题目大意:有4*4的正方形棋盘,里面有黑白棋子,我们翻转一个棋子会改变它本身以及周围棋子的颜色,求最少多少步可以把所以棋子翻成同色。思路:首先判断棋盘本身是否为纯色,如果是输出0。 从挑出1个棋子翻转开始,挑出2个翻转,3个,4个……16个,共有2的16次方种翻转方法。 在翻转过程原创 2017-09-05 18:53:22 · 1078 阅读 · 1 评论 -
POJ1260-Pearls(dp)
POJ1260 原题链接http://poj.org/problem?id=1260PearlsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 9562 Accepted: 4873DescriptionIn Pearlania every原创 2017-09-10 16:16:19 · 203 阅读 · 0 评论 -
poj1836-Alignment(LIS)
poj1836 原题链接:http://poj.org/problem?id=1836DescriptionIn the army, a platoon is composed by n soldiers. During the morning inspection, the soldiers are aligned in a straight line in front of t原创 2017-09-12 19:17:56 · 270 阅读 · 0 评论 -
HDU2196-Computer(树形dp)
原题传送门ComputerTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 31201 Accepted Submission(s): 3989Problem DescriptionA school bo原创 2017-10-18 17:12:23 · 244 阅读 · 1 评论 -
POJ1276-Cash Machine(多重背包)
题目链接:poj挂了以后补上DescriptionA Bank plans to install a machine for cash withdrawal. The machine is able to deliver appropriate @ bills for a requested cash amount. The machine uses exactly N dis原创 2017-10-07 21:57:41 · 410 阅读 · 0 评论 -
POJ-3461(KMP模版题)
poj3461,原题链接:POJ挂了贴不出来题目大意:给一个主串和子串,求子串在主串中出现的次数;思路:KMP模版题,代码如下:#include#include#include#includeusing namespace std;const int N=1e6+10;char T[N];char P[N];int next[N];int sum;void原创 2017-10-03 15:29:13 · 176 阅读 · 0 评论 -
POJ 2752-Seek the Name, Seek the Fame(KMP的next数组运用)
poj 2752Seek the Name, Seek the FameTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 8261 Accepted: 3883DescriptionThe little cat i原创 2017-10-03 15:45:46 · 180 阅读 · 0 评论 -
POJ1644-(放苹果)-递归
原题链接:http://poj.org/problem?id=1664放苹果Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 34897 Accepted: 21600Description把M个同样的苹果放在N个同样的盘子里,允原创 2017-10-11 17:48:13 · 210 阅读 · 0 评论 -
POJ1182-食物链(经典并查集)
题目链接:poj拉闸了http://poj.org/problem?id=1182题意:动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。 有人用两种说法对这N个动物所构成的食物链关系进行描述: “1 X Y”,表示X和Y是同类。 “原创 2017-10-11 21:06:42 · 172 阅读 · 0 评论 -
HDU1520-Anniversary party(树形dp)
Problem DescriptionThere is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical structure of employees. It means that the supervi原创 2017-10-13 19:27:25 · 198 阅读 · 0 评论 -
POJ1328-Radar Installation(贪心)
POJ1328Radar InstallationTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 93037 Accepted: 20765DescriptionAssume the coasting is an infinite stra原创 2017-11-01 18:47:24 · 434 阅读 · 0 评论 -
POJ3107-God father(树形dp??)
原题链接:http://poj.org/problem?id=3107GodfatherTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 6121 Accepted: 2164DescriptionLast原创 2017-10-25 18:12:56 · 238 阅读 · 0 评论 -
POJ2528-Mayor's posters(线段树+离散化)
原题地址:点击打开链接Mayor's postersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 70678 Accepted: 20384DescriptionThe citizens of Bytetown, AB, could no原创 2017-11-30 21:55:23 · 259 阅读 · 2 评论 -
POJ3321-Apple Tree(dfs序+线段树)
poj3321 原题链接:http://poj.org/problem?id=3321Apple TreeTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 30871 Accepted: 9243DescriptionThere is an apple tree outside of kaka's house. Every autu...原创 2018-02-11 19:54:23 · 222 阅读 · 0 评论 -
POJ2533-Longest Ordered Subsequence(dp)
POJ2533 原题链接:http://poj.org/problem?id=2533Longest Ordered SubsequenceTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 55259 Accepted: 24781Descripti原创 2017-09-11 17:32:49 · 199 阅读 · 0 评论 -
POJ1840-Eqs(hash)
POJ1840 原题链接:http://poj.org/problem?id=1840EqsTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 16935 Accepted: 8312DescriptionConsider equations原创 2017-09-19 16:19:41 · 323 阅读 · 0 评论 -
POJ2488-A Knight's Journey(DFS)
POJ2488 原题链接:http://poj.org/problem?id=2488A Knight's JourneyTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 46885 Accepted: 15967DescriptionBackg原创 2017-09-06 16:53:44 · 262 阅读 · 0 评论 -
POJ3278-Catch That Cow(bfs)
poj 3278,原题链接:http://poj.org/problem?id=3278。DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,原创 2017-09-05 20:17:47 · 226 阅读 · 0 评论 -
邻接表-数组的实现
邻接表-数组的实现 前些天做了一道poj3321,这道题是一个dfs序+树状数组/线段树,看了许久没有看懂,没有看懂的地方不是dfs序或者线段树/树状数组,而是邻接表建树(数组),总结了一下方法流程。 先任意给几条边用作例子:4 5 //四条边,五个点1 4 //点1,4中有一条边4 3 1 2 2 4 1.定义两个数组first和next原创 2017-09-21 19:54:16 · 2248 阅读 · 0 评论 -
POJ2299-Ultra-QuickSort(树状数组+离散化)
POJ2299 原题链接:http://poj.org/problem?id=2299Ultra-QuickSortTime Limit: 7000MS Memory Limit: 65536KTotal Submissions: 63588 Accepted: 23705DescriptionIn thi原创 2017-09-14 21:04:15 · 422 阅读 · 0 评论 -
POJ1936-All in All(纯水题)
POJ1936 原题链接:http://poj.org/problem?id=1936All in AllTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 33646 Accepted: 14057DescriptionYou have de原创 2017-09-14 21:32:45 · 528 阅读 · 0 评论 -
POJ3083-Children of the Candy Corn(bfs+dfs)
POJ3083 原题链接:http://poj.org/problem?id=3083Children of the Candy CornTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14221 Accepted: 6151Description原创 2017-09-07 15:16:12 · 216 阅读 · 0 评论 -
POJ1837-Balance(01背包)
POJ1837 原题链接:http://poj.org/problem?id=1837BalanceTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 15207 Accepted: 9554DescriptionGigel has a str原创 2017-09-07 21:06:07 · 322 阅读 · 0 评论 -
POJ3267-The Cow Lexicon(dp)
POJ3276 原题链接:http://poj.org/problem?id=3267The Cow LexiconTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 10896 Accepted: 5214DescriptionFew kno原创 2017-09-08 16:03:23 · 254 阅读 · 0 评论 -
POJ1035-Spell checker(字符串,模拟)
POJ1035 原题链接:http://poj.org/problem?id=1035Spell checkerTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 25949 Accepted: 9505DescriptionYou, as a原创 2017-09-08 16:45:12 · 219 阅读 · 0 评论 -
POJ3254-Corn Fields(状压dp)
原题链接:http://poj.org/problem?id=3254Corn FieldsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 16740 Accepted: 8845DescriptionFarmer John has pur原创 2017-09-27 15:46:12 · 266 阅读 · 0 评论 -
POJ3349-Snowflake Snow Snowflakes(hash表)
POJ3349 原题链接:http://poj.org/problem?id=3349Snowflake Snow SnowflakesTime Limit: 4000MS Memory Limit: 65536KTotal Submissions: 43393 Accepted: 11385Description原创 2017-09-19 15:04:34 · 372 阅读 · 0 评论 -
启发式算法
https://shaoweicai.wordpress.com/2010/09/23/%E5%90%AF%E5%8F%91%E5%BC%8F%E7%AE%97%E6%B3%95%EF%BC%88heuristic-algorithm%EF%BC%89/启发式算法(Heuristic Algorithm)有不同的定义:一种定义为,一个基于直观或经验的构造的算转载 2018-04-18 20:27:44 · 2656 阅读 · 0 评论