上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 16 下一页
摘要: 1001: [BeiJing2006]狼抓兔子 Description 现在小朋友们最喜欢的"喜羊羊与灰太狼",话说灰太狼抓羊不到,但抓兔子还是比较在行的, 而且现在的兔子还比较笨,它们只有两个窝,现在你做为狼王,面对下面这样一个网格的地形: 左上角点为(1,1),右下角点为(N,M)(上图中N=4 阅读全文
posted @ 2017-12-08 00:15 嘒彼小星 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 1202: [HNOI2005]狡猾的商人 Description *** 姹接到一个任务,为税务部门调查一位商人的账本,看看账本是不是伪造的。账本上记录了n个月以来的收入情况,其中第i 个月的收入额为Ai(i=1,2,3...n-1,n), 。当 Ai大于0时表示这个月盈利Ai 元,当 Ai小于0时表 阅读全文
posted @ 2017-12-05 00:02 嘒彼小星 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 1270: [BeijingWc2008]雷涛的小猫 Description Input Output Sample Input Sample Output 8 HINT Source dp水题 题解见代码注释 1 #include <iostream> 2 #include <cstdio> 3 阅读全文
posted @ 2017-12-04 23:29 嘒彼小星 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 1003: [ZJOI2006]物流运输 Description 物流公司要把一批货物从码头A运到码头B。由于货物量比较大,需要n天才能运完。货物运输过程中一般要转 停好几个码头。物流公司通常会设计一条固定的运输路线,以便对整个运输过程实施严格的管理和跟踪。由于各种 因素的存在,有的时候某个码头会无 阅读全文
posted @ 2017-12-03 23:34 嘒彼小星 阅读(197) 评论(0) 推荐(0) 编辑
摘要: The Bookcase https://odzkskevi.qnssl.com/31465a17250189570dad37924cda0d26?v=1508622471 【题解】 。。。紫书上第二个优化不可信啊!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 去了第二个优化写 阅读全文
posted @ 2017-10-25 20:55 嘒彼小星 阅读(424) 评论(0) 推荐(0) 编辑
摘要: Fun Game https://odzkskevi.qnssl.com/8d698323a1e07d605cdeea708ee8a01d?v=1508703139 【题解】 不难发现如果一个串的原串或反转串是另一个串的子串,那么这个串是没有用的 我们把他剔除出去 如果此时只有一个串,暴力枚举解检查 阅读全文
posted @ 2017-10-25 14:32 嘒彼小星 阅读(358) 评论(0) 推荐(0) 编辑
摘要: Bigger is Better https://odzkskevi.qnssl.com/91b457ef612009fbd8a70f1852aad0cc?v=1508483406 【题解】 dp[i][j]表示前i位数mod m = j的最小火柴数 据此找到位数i,从高位开始枚举做即可 需要与处理 阅读全文
posted @ 2017-10-25 07:51 嘒彼小星 阅读(243) 评论(0) 推荐(0) 编辑
摘要: Fixing the Great Wall https://odzkskevi.qnssl.com/b7d37f69f479d57e44735fc5d6403983?v=1508326275 【题解】 按照x排序 dp[i][j][0/1]表示从i到j全修好,当前在i/j的最小代价和已知的未修好的时 阅读全文
posted @ 2017-10-24 19:45 嘒彼小星 阅读(217) 评论(0) 推荐(0) 编辑
摘要: Dropping water balloons https://odzkskevi.qnssl.com/0876833faf9646139e4e75ecade141db?v=1508497019 【题解】 太神辣。。。 dp[i][j]表示用i个气球,j次试验所测试的楼的最大高度 当我们已知dp[1 阅读全文
posted @ 2017-10-24 15:02 嘒彼小星 阅读(264) 评论(0) 推荐(0) 编辑
摘要: Team them up! https://odzkskevi.qnssl.com/9698e76abf2d161889085123803f9464?v=1508663873 【题解】 把“两个人不相互认识”连边,形成若干连通分量 不难发现每个联通分量进行黑白染色后,必定选黑或选白 DP[i][j] 阅读全文
posted @ 2017-10-24 07:27 嘒彼小星 阅读(229) 评论(0) 推荐(0) 编辑
摘要: Twenty Questions https://odzkskevi.qnssl.com/15b7eb4cd1f75f63cee3945b0b845e4f?v=1508411736 【题解】 dp[S1][S2]表示已经询问了S1,确定有S2,还需要至少多少次询问 dp[S1][S2] = max( 阅读全文
posted @ 2017-10-23 17:18 嘒彼小星 阅读(228) 评论(0) 推荐(0) 编辑
摘要: D. Robot Control time limit per test 6 seconds memory limit per test 256 megabytes input standard input output standard output The boss of the Company 阅读全文
posted @ 2017-10-23 11:43 嘒彼小星 阅读(653) 评论(0) 推荐(0) 编辑
摘要: https://odzkskevi.qnssl.com/b506a3c20adad78678917d1ff4c9b953?v=1508327485 【题解】 dp[i][S1][S2]表示前i个教师选/不选已经决策完,当前有一个老师教的课程为S1,两个老师教的课程为S2,还需要的最小价值 答案为dp 阅读全文
posted @ 2017-10-23 08:14 嘒彼小星 阅读(244) 评论(0) 推荐(0) 编辑
摘要: Another Crisis A couple of years ago, a new world wide crisis started, leaving many people with economical problems. Some workers of a particular comp 阅读全文
posted @ 2017-10-22 15:41 嘒彼小星 阅读(243) 评论(0) 推荐(0) 编辑
摘要: https://odzkskevi.qnssl.com/e17d84412b7ea3a42b6503109d6dfbc1?v=1508053531 【题解】 裸区间dp,注意一堆细节 1 #include <iostream> 2 #include <cstdio> 3 #include <algo 阅读全文
posted @ 2017-10-20 19:26 嘒彼小星 阅读(167) 评论(0) 推荐(0) 编辑
摘要: https://vjudge.net/problem/UVA-1625 【题解】 很有思维难度的一道题 http://www.cnblogs.com/zyb993963526/p/6364069.html 1 #include <iostream> 2 #include <cstdio> 3 #in 阅读全文
posted @ 2017-10-20 10:37 嘒彼小星 阅读(249) 评论(0) 推荐(0) 编辑
摘要: Partitioning by Palindromes We say a sequence of characters is a palindrome if it is the same written forwards and backwards. For example, ‘racecar’ i 阅读全文
posted @ 2017-10-19 10:33 嘒彼小星 阅读(240) 评论(0) 推荐(0) 编辑
摘要: A. Queries time limit per test 0.25 s memory limit per test 64 MB input standard input output standard output Mathematicians are interesting (sometime 阅读全文
posted @ 2017-10-18 11:16 嘒彼小星 阅读(271) 评论(0) 推荐(0) 编辑
摘要: You are given the task to design a lighting system for a huge conference hall. After doing a lot of calculation and sketching, you have figured out th 阅读全文
posted @ 2017-10-18 09:49 嘒彼小星 阅读(177) 评论(0) 推荐(0) 编辑
摘要: (If you smiled when you see the title, this problem is for you ^_^) For those who don’t know KTV, see: http://en.wikipedia.org/wiki/Karaoke_box There 阅读全文
posted @ 2017-10-18 00:19 嘒彼小星 阅读(164) 评论(0) 推荐(0) 编辑
摘要: https://odzkskevi.qnssl.com/292ca2c84ab5bd27a2a91d66827dd320?v=1508162936 https://vjudge.net/problem/UVA-116 Problems that require minimum paths throu 阅读全文
posted @ 2017-10-17 23:37 嘒彼小星 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 不要62 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 46770 Accepted Submission(s): 17751 Problem 阅读全文
posted @ 2017-10-17 19:54 嘒彼小星 阅读(216) 评论(3) 推荐(0) 编辑
摘要: 3670: [Noi2014]动物园 Description 近日,园长发现动物园中好吃懒做的动物越来越多了。例如企鹅,只会卖萌向游客要吃的。为了整治动物园的不良风气,让动物们凭自己的真才实学向游客要吃的,园长决定开设算法班,让动物们学习算法。 某天,园长给动物们讲解KMP算法。 园长:“对于一个字 阅读全文
posted @ 2017-10-17 09:54 嘒彼小星 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Dexter is tired of Dee Dee. So he decided to keep Dee Dee busy in a game. The game he planned for her is quite easy to play but not easy to win at lea 阅读全文
posted @ 2017-10-17 08:37 嘒彼小星 阅读(253) 评论(0) 推荐(0) 编辑
摘要: John Doe, a skilled pilot, enjoys traveling. While on vacation, he rents a small plane and starts visiting beautiful places. To save money, John must 阅读全文
posted @ 2017-10-17 07:59 嘒彼小星 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 1924: [Sdoi2010]所驼门王的宝藏 Description Input 第 一行给出三个正整数 N, R, C。 以下 N 行,每行给出一扇传送门的信息,包含三个正整数xi, yi, Ti,表示该传送门设在位于第 xi行第yi列的藏宝宫室,类型为 Ti。Ti是一个1~3间的整数, 1表示 阅读全文
posted @ 2017-10-17 06:45 嘒彼小星 阅读(333) 评论(0) 推荐(0) 编辑
摘要: F. Monkeying Around time limit per test 2.0 s memory limit per test 256 MB input standard input output standard output When the monkey professor leave 阅读全文
posted @ 2017-10-16 21:06 嘒彼小星 阅读(574) 评论(1) 推荐(1) 编辑
摘要: Kingdom of Black and White Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 3735 Accepted Submissi 阅读全文
posted @ 2017-10-16 20:47 嘒彼小星 阅读(209) 评论(0) 推荐(0) 编辑
摘要: https://odzkskevi.qnssl.com/5e1fdf8cae5d11a8f572bae96d6095c0?v=1507521965 Perhaps you have heard of the legend of the Tower of Babylon. Nowadays many 阅读全文
posted @ 2017-10-16 10:13 嘒彼小星 阅读(235) 评论(0) 推荐(0) 编辑
摘要: https://odzkskevi.qnssl.com/f42a2762ecb9e7541fde59742e2f52e7?v=1507521953 【题解】 DP。 dp[i][j]表示在i时间第j个车站最短等待时间 三种决策: 原地等1s 搭乘从左开往右的 搭乘从右开往左的 ok[i][j][0] 阅读全文
posted @ 2017-10-16 08:51 嘒彼小星 阅读(97) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 16 下一页