08 2014 档案

摘要:题意: 给出最多5个序列,问这几个序列的最长公共子序列的长度是多少。solution : 脑抽级别我是,第一个序列每个数字位置固定,这样只要维护一个k-1维的偏序集就好了。然后在保证每个位置合法的情况下走一遍最长上升子序列就好了。1#include2usingnamespacestd;3consti... 阅读全文
posted @ 2014-08-30 20:56 acvc 阅读(163) 评论(0) 推荐(0) 编辑
摘要:左右子树总是这么的相关 阅读全文
posted @ 2014-08-29 21:29 acvc 阅读(117) 评论(0) 推荐(0) 编辑
摘要:http://ygdtc.sinaapp.com/ 阅读全文
posted @ 2014-08-27 17:39 acvc 阅读(117) 评论(0) 推荐(0) 编辑
摘要:http://poj.org/problem?id=1330题意:给出一个图,求两个点的最近公共祖先。sl :水题,贴个模板试试代码。本来是再敲HDU4757的中间发现要用LCA, 操蛋只好用这个题目试试自己写的对不对。 下面是个倍增的写法,挺实用的。好了,继续。。。1#include2#inclu... 阅读全文
posted @ 2014-08-23 16:49 acvc 阅读(192) 评论(0) 推荐(0) 编辑
摘要:1407 - 郁闷的小J 小J是国家图书馆的一位图书管理员,他的工作是管理一个巨大的书架。虽然他很能吃苦耐劳,但是由于这个书架十分巨大,所以他的工作效率总是很低,以致他面临着被解雇的危险,这也正是他所郁闷的。 具体说来,书架由N个书位组成,编号从1到N。每个书位放着一本书,每本书有一个特定的编码。 ... 阅读全文
posted @ 2014-08-20 23:39 acvc 阅读(325) 评论(0) 推荐(0) 编辑
摘要:As another one of their crazy antics, the N (1 ≤ N ≤ 100,000) cows want Farmer John to race against the clock to answer some of their pressing questio... 阅读全文
posted @ 2014-08-20 16:19 acvc 阅读(282) 评论(0) 推荐(0) 编辑
摘要:1#include2#include3#include4#include5#include6usingnamespacestd;7constintinf=0x3f3f3f3f;8constintMAX=200+10;9doubleGPA[10],dp1[20][30000],dp2[20][3000... 阅读全文
posted @ 2014-08-19 22:24 acvc 阅读(248) 评论(0) 推荐(0) 编辑
摘要:Another OCD PatientProblem DescriptionXiaoji is an OCD (obsessive-compulsive disorder) patient. This morning, his children played with plasticene. The... 阅读全文
posted @ 2014-08-19 22:18 acvc 阅读(444) 评论(0) 推荐(0) 编辑
摘要:找不到题目了,试敲了一下感觉还是挺不错的,学习了下别人的代码,差不多能感受到他的强大。哈哈。sl :可以说算是超级水提了,只要清楚这个数据结构就知道了。 1#include2#include3#include4usingnamespacestd;5constintMAX=100000+10;6int... 阅读全文
posted @ 2014-08-17 17:50 acvc 阅读(309) 评论(0) 推荐(0) 编辑
摘要:1#include2#include3#include4#include5#defineN1000056usingnamespacestd;7structSBT{8//左子树指针,右子树指针,大小,键值9intleft,right,size,key;10voidInit(){11left=righ... 阅读全文
posted @ 2014-08-17 17:44 acvc 阅读(272) 评论(0) 推荐(0) 编辑
摘要:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4441题意:有n个靶子,每个靶子有3个val,需要满足3钟情况分别得到他们的val。问最大的... 阅读全文
posted @ 2014-08-17 00:19 acvc 阅读(176) 评论(0) 推荐(0) 编辑
摘要:C. Petya and SpidersLittle Petya loves training spiders. Petya has a boardn × min size. Each cell of the board initially has a spider sitting on it. A... 阅读全文
posted @ 2014-08-17 00:10 acvc 阅读(212) 评论(0) 推荐(0) 编辑
摘要:E. Pashmak and GraphPashmak's homework is a problem about graphs. Although he always tries to do his homework completely, he can't solve this problem.... 阅读全文
posted @ 2014-08-16 11:08 acvc 阅读(153) 评论(0) 推荐(0) 编辑
摘要:D. Pashmak and Parmida's problemtime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputParmida is a cle... 阅读全文
posted @ 2014-08-16 11:00 acvc 阅读(170) 评论(0) 推荐(0) 编辑
摘要:KingdomProblem DescriptionTeacher Mai has a kingdom consisting of n cities. He has planned the transportation of the kingdom. Every pair of cities has... 阅读全文
posted @ 2014-08-15 22:45 acvc 阅读(335) 评论(0) 推荐(0) 编辑
摘要:D. Little Pony and Harmony Chesttime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPrincess Twiligh... 阅读全文
posted @ 2014-08-15 19:35 acvc 阅读(159) 评论(0) 推荐(0) 编辑
摘要:D. Count Good Substringstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWe call a stringgood, if... 阅读全文
posted @ 2014-08-15 19:25 acvc 阅读(166) 评论(0) 推荐(0) 编辑
摘要:2048Problem DescriptionTeacher Mai is addicted to game 2048. But finally he finds it's too hard to get 2048. So he wants to change the rule:You are gi... 阅读全文
posted @ 2014-08-15 14:29 acvc 阅读(388) 评论(0) 推荐(0) 编辑
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=3664题意:给出数字n,问n的所有的排列中满足Ai>i 数字恰好为 k的排列的个数。sl : dpdp【n】【k】 = dp【n-1】【k】*(k+1) + dp【n-1】【k-1】*(n-1-k+1);为什么? ... 阅读全文
posted @ 2014-08-12 23:53 acvc 阅读(163) 评论(0) 推荐(0) 编辑
摘要:只有一句话 : 交题的那一瞬间总是这么的感动 嘎嘎。虽然说只能搞水体。。。 阅读全文
posted @ 2014-08-12 22:33 acvc 阅读(144) 评论(0) 推荐(0) 编辑
摘要:FSF’s gameProblem DescriptionFSF has programmed a game.In this game, players need to divide a rectangle into several same squares.The length and width... 阅读全文
posted @ 2014-08-12 20:30 acvc 阅读(311) 评论(0) 推荐(0) 编辑
摘要:Magical ForestProblem DescriptionThere is a forest can be seen as N * M grid. In this forest, there is some magical fruits, These fruits can provide a... 阅读全文
posted @ 2014-08-12 19:24 acvc 阅读(242) 评论(0) 推荐(0) 编辑
摘要:Stupid Tower DefenseProblem DescriptionFSF is addicted to a stupid tower defense game. The goal of tower defense games is to try to stop enemies from ... 阅读全文
posted @ 2014-08-12 19:20 acvc 阅读(224) 评论(0) 推荐(0) 编辑
摘要:小橙子Time Limit: 2000 MSMemory Limit: 32768 KTotal Submit: 2(2 users)Total Accepted: 1(1 users)Rating:Special Judge:NoDescription玻璃小屋里曾经住着一个小橙子。小橙子小小的,性... 阅读全文
posted @ 2014-08-10 17:32 acvc 阅读(233) 评论(0) 推荐(0) 编辑
摘要:D. A Lot of Gamestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAndrew, Fedor and Alex are inven... 阅读全文
posted @ 2014-08-10 16:09 acvc 阅读(162) 评论(0) 推荐(0) 编辑
摘要:B. Mushroom Scientiststime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAs you very well know, the... 阅读全文
posted @ 2014-08-08 15:10 acvc 阅读(261) 评论(0) 推荐(0) 编辑
摘要:Room and MoorProblem DescriptionPM Room defines a sequence A = {A1, A2,..., AN}, each of which is either 0 or 1. In order to beat him, programmer Moor... 阅读全文
posted @ 2014-08-07 21:07 acvc 阅读(267) 评论(0) 推荐(0) 编辑
摘要:Problem 2105 Digits CountProblem DescriptionGiven N integers A={A[0],A[1],...,A[N-1]}. Here we have some operations:Operation 1:AND opn L RHere opn, L... 阅读全文
posted @ 2014-08-07 19:50 acvc 阅读(186) 评论(0) 推荐(0) 编辑
摘要:Fighting the LandlordsProblem DescriptionFighting the Landlords is a card game which has been a heat for years in China. The game goes with the 54 pok... 阅读全文
posted @ 2014-08-07 19:35 acvc 阅读(466) 评论(0) 推荐(0) 编辑
摘要:E. Lucky ArrayPetya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky... 阅读全文
posted @ 2014-08-02 22:10 acvc 阅读(367) 评论(0) 推荐(0) 编辑
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=3308题意: 两个操作 : 1 修改 单点 a 处的值。 2求出 区间【a,b】内的最长上升子序列。做法:线段树区间合并。了解线段树的具体含义很容易。1//bycaonima2//hehe3#include4#... 阅读全文
posted @ 2014-08-01 18:47 acvc 阅读(169) 评论(0) 推荐(0) 编辑
摘要:http://poj.org/problem?id=3667题意:两个操作 : 1 选出靠左的长度为a的区间。 2 把从 a到a+b的区间清空。线段树区间合并+lazy//bycaonima//hehe#include#include#include#include#includeusingname... 阅读全文
posted @ 2014-08-01 18:45 acvc 阅读(197) 评论(0) 推荐(0) 编辑
摘要:lazy区间修改 :http://acm.hdu.edu.cn/showproblem.php?pid=4902 (hdu4902)http://acm.hdu.edu.cn/showproblem.php?pid=4893 (hdu4902)http://codeforces.com/conte... 阅读全文
posted @ 2014-08-01 14:57 acvc 阅读(381) 评论(0) 推荐(0) 编辑

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