随笔分类 -  OJ -- POJ

摘要:【POJ1704】Georgia and Bob(博弈论) 题面 "POJ" "Vjudge" 题解 这种一列格子中移动棋子的问题一般可以看做成一个阶梯博弈。 将一个棋子向左移动时,它和前面棋子的距离变小,和后面棋子的距离变大,并且减小的值和增大的值是相等的,因此,这个过程我们就可以等价成一个阶梯博 阅读全文
posted @ 2018-08-15 22:18 小蒟蒻yyb 阅读(522) 评论(0) 推荐(0) 编辑
摘要:【POJ2411】Mondriaan's Dream(轮廓线DP) 题面 "Vjudge" 题解 这题我会大力状压!!! 时间复杂度大概是O(22nn2),设f[i][S]表示当前第i行向下伸展出去的状态为S 那么每次枚举一下当前行的放法,进行转移就好了。 然后就长成了这个样 阅读全文
posted @ 2018-08-03 16:19 小蒟蒻yyb 阅读(512) 评论(1) 推荐(0) 编辑
摘要:【POJ2891】Strange Way to Express Integers(拓展CRT) 题面 "Vjudge" 板子题。 题解 拓展CRT模板题。 cpp include include using namespace std; define ll long long define MA 阅读全文
posted @ 2018-07-16 09:18 小蒟蒻yyb 阅读(271) 评论(0) 推荐(0) 编辑
摘要:【POJ3621】【洛谷2868】Sightseeing Cows(分数规划) 题面 "Vjudge" "洛谷" 大意: 在有向图图中选出一个环,使得这个环的点权/边权最大 题解 分数规划 二分答案之后把每条边的边权换为mid·边权 出点的点权 然后检查有没有负环就行啦 阅读全文
posted @ 2018-05-24 15:19 小蒟蒻yyb 阅读(270) 评论(0) 推荐(0) 编辑
摘要:【POJ2728】Desert King(分数规划) 题面 "vjudge" 翻译: 有n个点,每个点有一个坐标和高度 两点之间的费用是高度之差的绝对值 两点之间的距离就是欧几里得距离 求一棵生成数,使得单位距离的费用最小 题解 使得cost/dis最小 这是分数规划问题 阅读全文
posted @ 2018-05-23 19:18 小蒟蒻yyb 阅读(388) 评论(0) 推荐(0) 编辑
摘要:【POJ2976】Dropping Tests(分数规划) 题面 "Vjudge" 翻译在Vjudge上有(而且很皮) 题解 简单的01分数规划 需要我们做的是最大化a[i]b[i] 考虑二分答案 将最大化问题转换为判定问题 $\sum{a[i]} 阅读全文
posted @ 2018-05-23 16:48 小蒟蒻yyb 阅读(333) 评论(0) 推荐(0) 编辑
摘要:【POJ1741】Tree(点分治) 题面 "Vjudge" 题目大意: 求树中距离小于K的点对的数量 题解 完全不觉得点分治了。。 简直GG,更别说动态点分治了。。。 于是来复习一下。 对于每一层分治重心 求出它到子树中任意点的距离 然后twopointers计算满足大于K的点对 阅读全文
posted @ 2018-04-05 21:48 小蒟蒻yyb 阅读(376) 评论(0) 推荐(0) 编辑
摘要:【POJ1151】Atlantis(线段树,扫描线) 题面 "Vjudge" 题解 学一学扫描线 其实很简单啦 这道题目要求的就是若干矩形的面积和 把扫描线平行于某个轴扫过去(我选的平行y轴扫) 这样只需要求出每次和x轴覆盖的长度 就可以两两相乘,求出面积 最后累计和就行啦 cpp incl 阅读全文
posted @ 2018-02-06 22:12 小蒟蒻yyb 阅读(402) 评论(1) 推荐(0) 编辑
摘要:【POJ1743】Musical Theme(后缀数组) 题面 "洛谷,这题是弱化版的,O(n2)dp能过" "hihoCoder 有一点点区别" "POJ 多组数据" 题解 要求的是最长不可重叠重复子串 也就是找两个最长的相同子串 使得它们不相交 先求出SA,height 考虑一下如果两 阅读全文
posted @ 2018-01-23 17:20 小蒟蒻yyb 阅读(329) 评论(0) 推荐(0) 编辑
摘要:【POJ2774】Long Long Message(后缀数组) 题面 "Vjudge" Description Little cat在Byterland的首都读物理专业。这些天他收到了一条悲伤地信息:他的母亲生病了。担心买火车票花钱太多(Byterland是一个巨大的国家,因此他坐火车回家需要16 阅读全文
posted @ 2018-01-23 14:48 小蒟蒻yyb 阅读(453) 评论(4) 推荐(0) 编辑
摘要:题面 Dearboy, a goods victualer, now comes to a big problem, and he needs your help. In his sale area there are N shopkeepers (marked from 1 to N) which 阅读全文
posted @ 2017-08-03 20:21 小蒟蒻yyb 阅读(321) 评论(0) 推荐(0) 编辑
摘要:题面 On a grid map there are n little men and n houses. In each unit time, every little man can move one unit step, either horizontally, or vertically, 阅读全文
posted @ 2017-08-03 16:53 小蒟蒻yyb 阅读(262) 评论(2) 推荐(0) 编辑
摘要:题面 You are in charge of setting up the press room for the inaugural meeting of the United Nations Internet eXecutive (UNIX), which has an internationa 阅读全文
posted @ 2017-08-03 15:49 小蒟蒻yyb 阅读(442) 评论(0) 推荐(0) 编辑
摘要:题面 Bessie, Farmer John's prize cow, has just won first place in a bovine beauty contest, earning the title 'Miss Cow World'. As a result, Bessie will 阅读全文
posted @ 2017-07-30 16:55 小蒟蒻yyb 阅读(326) 评论(0) 推荐(0) 编辑
摘要:题面 One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm X (1 ≤ X ≤ N). A tot 阅读全文
posted @ 2017-07-26 23:52 小蒟蒻yyb 阅读(188) 评论(0) 推荐(0) 编辑
摘要:题面 Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him 阅读全文
posted @ 2017-07-26 23:12 小蒟蒻yyb 阅读(227) 评论(1) 推荐(0) 编辑
摘要:题面 Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, b 阅读全文
posted @ 2017-07-26 14:32 小蒟蒻yyb 阅读(312) 评论(0) 推荐(0) 编辑
摘要:题面 Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. 阅读全文
posted @ 2017-07-25 23:26 小蒟蒻yyb 阅读(227) 评论(1) 推荐(0) 编辑
摘要:题面 Bessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 include include include include include 阅读全文
posted @ 2017-07-24 10:02 小蒟蒻yyb 阅读(292) 评论(2) 推荐(1) 编辑
摘要:题面 The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote 阅读全文
posted @ 2017-07-17 20:06 小蒟蒻yyb 阅读(268) 评论(2) 推荐(0) 编辑

点击右上角即可分享
微信分享提示