![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
dp动态规划
Seeyouer
这个作者很懒,什么都没留下…
展开
-
UPC 5727 小奇遐想
题目描述撷来一缕清风飘渺 方知今日书信未到 窗外三月天霁垂柳新长枝条 风中鸟啼犹带欢笑 ——《清风醉梦》 小奇望着青天中的悠悠白云,开始了无限的遐想,在它的视野中,恰好有n朵高度不同的白云排成一排,他想从左到右选出四朵白云a,b,c,d,使得h_a<h_b<h_d<h_c,即看起来像是彩虹的形状!它想知道有多少种方案数。输入第一行包括1个整数n。 第二行包...原创 2018-07-29 10:11:38 · 222 阅读 · 0 评论 -
UPC 6611 Bichrome Tree
题目描述We have a tree with N vertices. Vertex 1 is the root of the tree, and the parent of Vertex i (2≤i≤N) is Vertex Pi. To each vertex in the tree, Snuke will allocate a color, either black or white...原创 2018-08-03 10:34:03 · 242 阅读 · 0 评论 -
ACM/NCPC2016 C Card Hand Sorting(upc 3028)
题目描述When dealt cards in the card game Plump it is a good idea to start by sorting the cards in hand by suit and rank. The different suits should be grouped and the ranks should be sorted within each...原创 2018-10-06 20:58:44 · 300 阅读 · 0 评论 -
(算法 动态规划dp)最优时间表问题
一台精密仪器的工作时间为 n 个时间单位。与仪器工作时间同步进行若干仪器维修程序。一旦启动维修程序,仪器必须进入维修程序。如果只有一个维修程序启动,则必须进入该维修程序。如果在同一时刻有多个维修程序,可任选进入其中的一个维修程序。维修程序必须从头开始,不能从中间插入。一个维修程序从第s个时间单位开始,持续t个时间单位,则该维修程序在第s+t-1个时间单位结束。为了提高仪器使用率,希望安排尽可能少...原创 2018-12-23 11:13:39 · 4779 阅读 · 2 评论