![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM_DP
DATELOST
I'm curious.
展开
-
HDU-1159 LCS 基础DP
Problem Description:A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = <x1, x2, …, xm> another sequence Z = <z1, z2, …,...原创 2019-01-27 22:01:56 · 131 阅读 · 0 评论 -
POJ-1463 树形DP
DescriptionBob enjoys playing computer games, especially strategic games, but sometimes he cannot find the solution fast enough and then he is very sad. Now he has the following problem. He must defe...原创 2019-07-13 23:16:36 · 90 阅读 · 0 评论 -
POJ-2342 树形DP
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 supervisor relatio...原创 2019-07-13 22:42:03 · 178 阅读 · 0 评论 -
哈尔滨工程大学第十四届程序设计竞赛(同步赛)D背包dp
链接:https://ac.nowcoder.com/acm/contest/642/D来源:牛客网题目描述网易云音乐推出了定时关闭播放的功能,假设到了定时关闭播放的时间,当前这首歌还没有播放完,那就把它播放完关闭;如果到了定时关闭的时间,当前歌恰好播放完,那就立即关闭。xrc 在知道网易云这个算法后,想知道如果自己定时 t 时间后关闭播放,那最多能听多长时间的歌,已知 xrc 歌单中一共有...原创 2019-04-21 19:57:05 · 265 阅读 · 0 评论 -
POJ-3264 RMQ倍增求极值
DescriptionFor the daily milking, Farmer John’s N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with some of the cows. To ...原创 2019-03-29 00:04:40 · 116 阅读 · 0 评论 -
CF 1140D 区间DP
D. Minimum TriangulationYou are given a regular polygon with n vertices labeled from 1 to n in counter-clockwise order. The triangulation of a given polygon is a set of triangles such that each verte...原创 2019-03-23 20:29:15 · 407 阅读 · 0 评论 -
CF 1141B dp
Each day in Berland consists of n hours. Polycarp likes time management. That’s why he has a fixed schedule for each day — it is a sequence a1,a2,…,an (each ai is either 0 or 1), where ai=0 if Polycar...原创 2019-03-21 00:02:40 · 149 阅读 · 0 评论 -
POJ-2955 区间DP
DescriptionWe give the following inductive definition of a “regular brackets” sequence:the empty sequence is a regular brackets sequence,if s is a regular brackets sequence, then (s) and [s] are re...原创 2019-02-23 11:53:30 · 209 阅读 · 0 评论 -
HDU-2224 双调欧几里得旅行商问题
Problem DescriptionThere are n points on the plane, Pi(xi, yi)(1 <= i <= n), and xi < xj (i<j). You begin at P1 and visit all points then back to P1. But there is a constraint:Before you...原创 2019-02-17 10:45:08 · 224 阅读 · 0 评论 -
HDU-1950 LIS
题目Sample Input46 4 2 6 3 1 510 2 3 4 5 6 7 8 9 10 18 8 7 6 5 4 3 2 19 5 8 9 2 3 1 7 4 6Sample Output3914题意:求最长上升子序列长度;解题思路:4e5只能采用优化的nlogn二分的方法代码:#include<bits/stdc++.h>...原创 2019-02-04 23:26:39 · 167 阅读 · 0 评论 -
HDU-2845 DP twice
Problem Description:Bean-eating is an interesting game, everyone owns an MN matrix, which is filled with different qualities beans. Meantime, there is only one bean in any 11 grid. Now you want to ea...原创 2019-01-31 22:48:32 · 129 阅读 · 0 评论 -
HDU-1506 下标DP
Problem Description:A histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have different heights. For example, the figu...原创 2019-01-30 19:26:35 · 264 阅读 · 0 评论 -
HDU-1069 约束DP
Problem Description:A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide the monkey with som...原创 2019-01-30 14:09:42 · 232 阅读 · 0 评论 -
HDU-2844 多重背包 DP
Problem Description:Whuacmers use coins.They have coins of value A1,A2,A3…An Silverland dollar. One day Hibix opened purse and found there were some coins. He decided to buy a very nice watch in a ne...原创 2019-01-29 11:15:50 · 142 阅读 · 0 评论 -
HDU-1058 Humble Numbers 打表
Problem Description:A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, … shows the first 2...原创 2019-01-28 19:32:35 · 460 阅读 · 0 评论 -
HDU-1087 LIS 基础DP
Problem Description:The game can be played by two or more than two players. It consists of a chessboard(棋盘)and some chessmen(棋子), and all chessmen are marked by a positive integer or “start” or “end”...原创 2019-01-28 13:44:36 · 129 阅读 · 0 评论 -
POJ-3585 树形dp 换根法
题目#include<iostream>#include<vector>#include<stdio.h>#include<string.h>#define P(i,j) make_pair(i,j)using namespace std;typedef long long ll;const int N=2e5+5;int t,n,...原创 2019-07-23 10:57:19 · 174 阅读 · 0 评论