摘要: M. It's complicatedtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDragon was drinking tea on a ... 阅读全文
posted @ 2015-07-27 20:07 gaoxiang36999 阅读(147) 评论(0) 推荐(0) 编辑
摘要: L. Many questionstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output—How could I have forgotten? Kn... 阅读全文
posted @ 2015-07-27 20:03 gaoxiang36999 阅读(181) 评论(0) 推荐(0) 编辑
摘要: K. Word ordertime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output—It is not about games,— Dragon dec... 阅读全文
posted @ 2015-07-27 19:56 gaoxiang36999 阅读(166) 评论(0) 推荐(0) 编辑
摘要: F. Game of wordstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output—But how can all of them be acq... 阅读全文
posted @ 2015-07-27 19:33 gaoxiang36999 阅读(192) 评论(0) 推荐(0) 编辑
摘要: A. Tea-drinkingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputCastles Valley was lit by the noo... 阅读全文
posted @ 2015-07-27 19:13 gaoxiang36999 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 最大子段和经典问题的扩展。题目链接:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1052N个整数组成的序列a[1],a[2],a[3],…,a[n],将这N个数划分为互不相交的M个子段,并且这M个子段的和是最大的。如果M... 阅读全文
posted @ 2015-07-21 20:10 gaoxiang36999 阅读(549) 评论(0) 推荐(0) 编辑
摘要: 由于深感自己水平低下,把大部分有效时间放在了刷题上,于是好久没写题解了。今天刚学了下划分树的原理,于是写道简单题练练手。题目链接:http://poj.org/problem?id=2104划分树的空间复杂度和时间复杂度均为O(nlogn),对于解决该问题而言,每次查询的复杂度为O(logn),比归... 阅读全文
posted @ 2015-06-11 20:40 gaoxiang36999 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://codeforces.com/contest/544/problem/C题目大意:n个程序员,m行代码,每个程序员每行会出现ai个bug,要求写完后不超过b个bug。可以想象成一个背包问题,即背包的容量为b,要求放m个物品,每个物品的体积是ai,唯一需要注意的是,每个程序员需... 阅读全文
posted @ 2015-05-08 03:37 gaoxiang36999 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://codeforces.com/problemset/problem/542/C题目大意:给定一种运算f,对于输入的数组来说,一步操作,f(x) = a[x],两步操作,f^2(x) = a[a[x]]....倘若每次进行k步操作之后,得到的都是同一个数,即k为符合条件的步数。... 阅读全文
posted @ 2015-05-07 12:07 gaoxiang36999 阅读(229) 评论(0) 推荐(0) 编辑
摘要: clj在某场hihoCoder比赛中的一道题,表示clj的数学题实在6,这道图论貌似还算可以。。。题目链接:http://hihocoder.com/problemset/problem/1167由于是中文题目,题意不再赘述。对于任意两条小精灵的活动路径a和b,二者相交的判断条件为b的两个端点的LC... 阅读全文
posted @ 2015-05-07 11:44 gaoxiang36999 阅读(214) 评论(0) 推荐(0) 编辑