![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
acm
Nicolas Lee
Yesterday you said tomorrow
展开
-
Beijing Guards UVALive - 3177 长城守卫 二分+贪心
Beijing was once surrounded by four rings of city walls: the Forbidden City Wall, the Imperial CityWall, the Inner City Wall, and nally the Outer City Wall. Most of these walls were demolished i...原创 2019-05-03 20:09:50 · 241 阅读 · 0 评论 -
Subsequence UVALive - 2678 子序列
A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Write a program to find the minimal le...原创 2019-05-04 20:49:47 · 205 阅读 · 0 评论 -
Distant Galaxy UVALive - 3695 遥远的银河系 矩阵边界枚举
题目链接 You are observing a distant galaxy using a telescope above the Astronomy Tower, and you think that a rectangle drawn in that galaxy whose edges are parallel to coordinate axes and contain maxi...原创 2019-05-06 13:09:23 · 229 阅读 · 0 评论 -
Exploring Pyramids UVALive - 3516 多叉树遍历
给出一棵多叉树,每个结点的任意两个子结点都有左右之分。从根结点开始,每次尽量往左走,走不通了就回溯,把遇到的字母顺次记录下来,可以得到一个序列。如图2-6所示的5 个图的序列均为ABABABA 。给定一个序列,问有多少棵树与之对应。 【输入格式】 输入包含多组数据。每组数据仅一行,即由大写字母组成的访问序列。序列非空,且长度不超过300 。输入结束标志为文件结束符(EOF) 。 【输出格式】 对...原创 2019-05-15 21:32:34 · 194 阅读 · 0 评论 -
Robotruck UVALive - 3983 捡垃圾的机器人 单调队列优化dp
题目链接 This problem is about a robotic truck that distributes mail packages to several locations in a factory. The robot sits at the end of a conveyer at the mail office and waits for packages to be l...原创 2019-05-11 19:09:18 · 253 阅读 · 0 评论 -
Sharing Chocolate UVALive - 4794 分享巧克力 状压dp
题目链接 给出一块长为x, 宽为y的矩形巧克力, 每次操作可以沿一条直线把一块巧克力切割成两块长宽均为整数的巧克力(一次不能同时切割多块巧克力) 。问: 是否可以经过若干次操作得到n块面积分别为a1,a2,…, an的巧克力。 如图1-44所示, 可以把3×4的巧克力切成面积分别为6,3, 2,1的4块。 图 1-44 【输入格式】 输入包含若干组数据。 每组数据的第一行为一个整数n(1≤n...原创 2019-05-11 20:31:43 · 385 阅读 · 0 评论