
POJ
Spark_007
Forward.
展开
-
动态规划(4)Testing the CATCHER 1887
Testing the CATCHERTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 13231 Accepted: 4833DescriptionA military contractor for the Department of Defense has原创 2013-04-22 19:45:55 · 729 阅读 · 0 评论 -
动态规划(5) 2168 Jokes With Turtles
DescriptionThere is a famous joke-riddle for children: Three turtles are crawling along a road. One turtle says: "There are two turtles ahead of me."The other turtle says: "There are two turtl原创 2013-04-26 11:39:37 · 1010 阅读 · 0 评论 -
Poj 2533-Longest Ordered Subsequence(最长有序子序列)
题意:就是求最长上升子序列。分析:有朴素的O(N^2)的简单dp,也有O(nlogn)的二分思想。方法一:dp,对应原序列的每个元素,dp数组记录包含这个数在内的与之前所有数一起能构成的最长有序子序列的长度,最后对dp数组遍历取最大值即可 #include#include#include#includeusing namespace std;int a[1005原创 2013-07-27 01:47:13 · 1114 阅读 · 0 评论 -
动态规划(6)Popular Cows poj2186
Popular CowsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 18989 Accepted: 7623DescriptionEvery cow's dream is to become the most popular cow in the herd原创 2013-04-28 09:59:56 · 781 阅读 · 0 评论 -
Sliding Window poj2823--单调队列
Sliding WindowTime Limit: 12000MS Memory Limit: 65536K Case Time Limit: 5000MSDescriptionAn array of size n ≤ 106 is given to you. There is a sliding window o原创 2013-05-06 18:51:49 · 841 阅读 · 0 评论 -
Japan poj3067--树状数组
JapanTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 16732 Accepted: 4488DescriptionJapan plans to welcome the ACM ICPC World Finals and a lot of roads mu原创 2013-04-29 22:56:22 · 781 阅读 · 0 评论 -
Mobile Phones poj 1195--二维树状数组
Mobile phonesTime Limit: 5000MS Memory Limit: 65536K DescriptionSuppose that the fourth generation mobile phone base stations in the Tampere area operate as follows原创 2013-04-30 16:27:50 · 842 阅读 · 0 评论 -
Oil Deposits poj1562 + Counting sheep hdu2952
Oil DepositsTime Limit: 1000MS Memory Limit: 10000K DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSur原创 2013-05-08 21:16:21 · 883 阅读 · 0 评论 -
DP(7)Post Office 1160
Post OfficeTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 13707 Accepted: 7376DescriptionThere is a straight highway with villages alongside the highway.原创 2013-04-28 20:56:39 · 741 阅读 · 0 评论 -
动态规划(2)Function Run Fun
Function Run FunTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 14127 Accepted: 7344DescriptionWe all love recursion! Don't we? Consider a three-param原创 2013-04-20 10:25:39 · 940 阅读 · 0 评论 -
动态规划(1)1163 The Triangle
The TriangleTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 32266 Accepted: 19083Description73 88 1 02 7 4 44 5 2 6 5(原创 2013-04-17 13:41:13 · 1966 阅读 · 0 评论 -
动态规划(3)Pots (BFS)
PotsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7809 Accepted: 3277 Special JudgeDescriptionYou are given two pots, having the volume of A and B原创 2013-04-20 10:42:07 · 1055 阅读 · 0 评论 -
POJ 1741 Tree + POJ 1987 Distance Statistics【树的点分治】
Tree Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 13558 Accepted: 4367 DescriptionGive a tree with n vertices,each edge has a length(positive integer less than 1001). Def原创 2015-08-03 23:40:44 · 801 阅读 · 0 评论