随笔分类 -  [kuangbin带你飞]专题刷题记录

记录蒟蒻艰难爬行之旅
摘要:题目链接:http://poj.org/problem?id=1661 分析:类似于最长递增子序列的dp题;坑点:如果下落过程中碰到板,那么必须在改板向左右再下落,不可以穿板,所以找到一次,该方向(左或者右)就不需要再找了 阅读全文
posted @ 2019-09-21 17:31 Veasky 阅读(204) 评论(0) 推荐(0)
摘要:题目链接:http://poj.org/problem?id=1458 分析:最大公共子序列模板 阅读全文
posted @ 2019-09-21 15:45 Veasky 阅读(174) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1160 分析:结构体内用一个元素记录每个老鼠的初始编号,然后对体重进行排序,对速度dp(注意体重不相等); 结构体内再用一个元素记录初始编号为i的老鼠在最长序列中上一个是初始编号为j的老鼠 阅读全文
posted @ 2019-08-29 14:22 Veasky 阅读(180) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1257 分析:对于每一个位置(i),向前找是否存在比它小(或者相等的数)记为j,如果存在,那i必然相较与j得多开一个拦截系统; 阅读全文
posted @ 2019-08-28 19:59 Veasky 阅读(426) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1260 分析:先算一下数据范围最多50000s,所以不超过当天晚上12点; dp相当水,从前往后决策 dp[i] = min(dp[i - 1] + s[i], dp[i - 2] + d[i]) 阅读全文
posted @ 2019-08-16 14:48 Veasky 阅读(321) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1176 分析:本质上是一个数塔问题,第一秒即数塔的第一行为4, 5, 6;第二秒即第二行为3, 4, 5, 6, 7;第三秒2, 3, 4, 5, 6, 7, 8;以此类推; dp[i][j]即第i秒走j 阅读全文
posted @ 2019-08-16 13:46 Veasky 阅读(127) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1114 分析:每个物品可以取无限个,完全背包问题,要求装满,所以dp[0]=0,其余为INF; 阅读全文
posted @ 2019-08-16 10:36 Veasky 阅读(128) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1087 分析:简单dp;dp[i] = max (dp[i], dp[j] + a[i]) 阅读全文
posted @ 2019-08-04 18:18 Veasky 阅读(104) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1074 分析:状压dp;看的dalao的题解。。。 用二进制表示,最大1<<n,对于他的二进制每一位分别表示第几个科目是否做了 阅读全文
posted @ 2019-08-04 16:30 Veasky 阅读(87) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1069 分析:每一个方块可以分成6种摆放情况,对于每种情况只能使用一次(严格小于);方块h作为权值不需要看,从大到小排长(排宽一样) 阅读全文
posted @ 2019-08-03 15:24 Veasky 阅读(147) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1029 分析:在dp专题里,但是数据给水了,导致桶排直接过了 阅读全文
posted @ 2019-08-03 15:18 Veasky 阅读(107) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1024 分析:dp,对于第i个数有两种情况,一个是在前一个数所在的组;一个是单独开一组,那么前一个数就不一定需要,此时要找1~(i -1)中最大 阅读全文
posted @ 2019-08-03 15:16 Veasky 阅读(124) 评论(0) 推荐(0)
摘要:题目: After coding so many days,Mr Acmer wants to have a good rest.So travelling is the best choice!He has decided to visit n cities(he insists on seein 阅读全文
posted @ 2019-07-02 15:19 Veasky 阅读(259) 评论(0) 推荐(0)
摘要:题目: 可怜的公主在一次次被魔王掳走一次次被骑士们救回来之后,而今,不幸的她再一次面临生命的考验。魔王已经发出消息说将在T时刻吃掉公主,因为他听信谣言说吃公主的肉也能长生不老。年迈的国王正是心急如焚,告招天下勇士来拯救公主。不过公主早已习以为常,她深信智勇的骑士LJ肯定能将她救出。 现据密探所报,公 阅读全文
posted @ 2019-06-27 15:24 Veasky 阅读(432) 评论(4) 推荐(0)
摘要:题目: Let's play a card game called Gap. You have 28 cards labeled with two-digit numbers. The first digit (from 1 to 4) represents the suit of the card 阅读全文
posted @ 2019-06-26 13:38 Veasky 阅读(194) 评论(0) 推荐(0)
摘要:题目: Last night, little erriyue had a horrible nightmare. He dreamed that he and his girl friend were trapped in a big maze separately. More terribly, 阅读全文
posted @ 2019-06-22 00:32 Veasky 阅读(185) 评论(0) 推荐(0)
摘要:题目: This is a very popular game for children. In this game, there's a cube, which consists of 3 * 3 * 3 small cubes. We can unwrap the cube, it will b 阅读全文
posted @ 2019-06-20 15:23 Veasky 阅读(391) 评论(0) 推荐(0)
摘要:题目: The twenty-first century is a biology-technology developing century. We know that a gene is made of DNA. The nucleotide bases from which DNA is bu 阅读全文
posted @ 2019-06-17 15:24 Veasky 阅读(261) 评论(1) 推荐(0)
摘要:题目: The students of the HEU are maneuvering for their military training. The red army and the blue army are at war today. The blue army finds that Lit 阅读全文
posted @ 2019-06-14 20:07 Veasky 阅读(433) 评论(0) 推荐(0)
摘要:题目: 一个规则的实心十二面体,它的 20个顶点标出世界著名的20个城市,你从一个城市出发经过每个城市刚好一次后回到出发的城市。 输入: 前20行的第i行有3个数,表示与第i个城市相邻的3个城市.第20行以后每行有1个数m,m<=20,m>=1.m=0退出. 输出: 输出从第m个城市出发经过每个城市 阅读全文
posted @ 2019-06-13 22:02 Veasky 阅读(507) 评论(0) 推荐(0)