POJ 2096 Collecting Bugs 期望dp

题目链接:http://poj.org/problem?id=2096Collecting BugsTime Limit: 10000MSMemory Limit: 64000K问题描述Ivan is fond of collecting. Unlike other people who colle
6次阅读

POJ 3281 Dining (最大流)

题目链接:http://poj.org/problem?id=3281引用一下题解:http://www.cnblogs.com/kuangbin/archive/2012/08/21/2649850.html 1 #include <iostream> 2 #include <
8次阅读

【尺取法好题】POJ2566-Bound Found

【题目大意】给出一个整数列,求一段子序列之和最接近所给出的t。输出该段子序列之和及左右端点。【思路】……前缀和比较神奇的想法。一般来说,我们必须要保证数列单调性,才能使用尺取法。预处理出前i个数的前缀和,和编号i一起放入pair中,然而根据前缀和大小进行排序。由于abs(
6次阅读

POJ 1330 Nearest Common Ancestors(Targin求LCA)

传送门Nearest Common AncestorsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 26612 Accepted: 13734DescriptionA r
21次阅读

poj 2337(单向欧拉路的判断以及输出)

CatenymsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11648 Accepted: 3036DescriptionA catenym is a pair of words separated by a
7次阅读

【尺取法】POJ3061 & POJ3320

POJ3061-Subsequence【题目大意】给定长度微n的数列整数及整数s。求出总和不小于s的连续子序列的长度的最小值。如果节不存在,则输出0。【思路】尺取法五分钟裸裸裸~刷水刷出了罪恶感:(基本做法:设置l和r代表当前区间[l,r],若S(l,r)<s,则 r++。若S(l,r)≥s,
6次阅读

poj 3352

Road ConstructionTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 11215 Accepted: 5575DescriptionIt's almost summer time,
6次阅读

[POJ3277]City Horizon

[POJ3277]City Horizon试题描述Farmer John has taken his cows on a trip to the city! As the sun sets, the cows gaze at the city horizon and observe the beau
5次阅读

[POJ1151]Atlantis

[POJ1151]Atlantis试题描述There are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include m
4次阅读

poj 1041(字典序输出欧拉回路)

John's tripTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8641 Accepted: 2893 Special JudgeDescriptionLittle Johnny has got
7次阅读