- 博客(42)
- 资源 (8)
- 收藏
- 关注
原创 HDOJ 4901 The Romantic Hero
DP....扫两遍组合起来The Romantic HeroTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 547 Accepted Submission(s): 217Problem Desc
2014-07-31 23:14:04 954
原创 HDOJ 4902 Nice boat
暴力线段树......Nice boatTime Limit: 30000/15000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 340 Accepted Submission(s): 163Problem Description
2014-07-31 21:02:56 923
原创 LightOJ 1205 Palindromic Numbers
数位DP。。。。Palindromic NumbersTime Limit: 2000MSMemory Limit: 32768KB64bit IO Format: %lld & %llu[Submit] [Go Back] [Status] DescriptionA palindro
2014-07-31 00:08:03 2013
原创 POJ 3252 Round Numbers
Round NumbersTime Limit: 2000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64u[Submit] [Go Back] [Status] DescriptionThe cows, as you know, have no
2014-07-30 21:00:20 838
原创 HDOJ 4893 Wow! Such Sequence!
Wow! Such Sequence!Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1265 Accepted Submission(s): 387Problem DescriptionRecent
2014-07-30 10:08:32 790
原创 POJ 2761 Feed the dogs
静态区间第K大,主席树。。。。Feed the dogsTime Limit: 6000MS Memory Limit: 65536KTotal Submissions: 15491 Accepted: 4780DescriptionWind loves pretty dogs very
2014-07-28 22:08:02 994
原创 Ubuntu Sublime_text3 Clang 编译的简单配置
网上关于sublime配置的不少,但有的配置编译运行居然更本没法输入!!!现在写一个靠谱点的配置://Ubuntu Sublime_text3 clang 编译的简单配置:{ "cmd": ["clang++", "${file}", "-o", "${file_path}/${file_base_name}"], "file_regex": "^(..[^:
2014-07-28 13:21:08 1389
原创 POJ 2104 K-th Number
静态区间第K大,主席树写法。主席树第一题,如果对整段区间建线段树可以求1~n范围内的第K大,要想求任意区间内的第K大需要建1~i 的n棵线段树。求某一段的时候区间相减就可以了。但是这样空间消耗太大所以要尽量利用以前的节点。注意到1~i的线段树和i~i+1的线段树只某一条链上的值不同,所以我们只要建出这一条链就可以了,剩下的节点和1~i+1的线段树是一样的,我们直接把节点指过去。T[ ...
2014-07-28 12:55:52 1072
原创 Codeforces 451 D. Count Good Substrings
D. Count Good Substringstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWe call a string good, if after me
2014-07-27 14:39:16 1172
原创 Codeforces 449 B. Jzzhu and Cities
堆优化dijkstra,如果哪条铁路可以被更新,就把对应铁路删除。B. Jzzhu and Citiestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outp
2014-07-27 09:44:42 1812 1
原创 Codeforces 451C. Predict Outcome of the Game
暴力模拟....C. Predict Outcome of the Gametime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTher
2014-07-26 15:10:39 984
原创 HDOJ 4876 ZCC loves cards
枚举组合,在不考虑连续的情况下判断是否可以覆盖L...R,对随机数据是一个很大的减枝.通过检测的暴力计算一遍ZCC loves cardsTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1346 Acc
2014-07-25 22:14:59 1362
原创 HDOJ 4862 Jump
K路径覆盖问题,最小费用最大流。。。。最小K路径覆盖的模型,用费用流或者KM算法解决,构造二部图,X部有N*M个节点,源点向X部每个节点连一条边,流量1,费用0,Y部有N*M个节点,每个节点向汇点连一条边,流量1,费用0,如果X部的节点x可以在一步之内到达Y部的节点y,那么就连边x->y,费用为从x格子到y格子的花费能量减去得到的能量,流量1,再在X部增加一个新的节点,表示可以从任意节
2014-07-25 15:01:05 1018
原创 HDOJ 4882 ZCC Loves Codefires
ZCC Loves CodefiresTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 198 Accepted Submission(s): 105Problem DescriptionThough Z
2014-07-24 21:32:16 918
原创 HDOJ 4865 Peter's Hobby
隐马尔可夫模型介绍见这里:点击打开链接Peter's HobbyTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 362 Accepted Submission(s): 160Problem De
2014-07-24 01:11:00 1357
原创 HDOJ 4869 Turn the pokers
最后的结果中正面向上的奇偶性是一定的,计算出正面向上的范围low,up结果即为 C(m,low)+ C(m,low+2) +.... + C(m,up) ,用逆元取模Turn the pokersTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total S
2014-07-23 21:47:43 964
原创 HDOJ 4870 Rating
概率DP.....RatingTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 229 Accepted Submission(s): 140Special JudgeProblem Des
2014-07-23 12:48:19 1096
原创 HDOJ 3359 Kind of a Blur
用高斯消元对高斯模糊的图像还原....Kind of a BlurTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1321 Accepted Submission(s): 383Proble
2014-07-22 08:31:09 794
原创 POJ 3185 The Water Bowls
高斯消元+枚举自由变元The Water BowlsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4276 Accepted: 1678DescriptionThe cows have a line of 20 wat
2014-07-21 16:36:00 1096
原创 HDOJ 4858 项目管理
暴力...项目管理Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 537 Accepted Submission(s): 189Problem Description我们建造了一个大
2014-07-21 14:18:37 935
原创 HDOJ 4857 逃生
BestHack.....真乱.....逃生Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 139 Accepted Submission(s): 20Problem Description
2014-07-20 22:21:48 1150
原创 Codeforces 450 B. Jzzhu and Sequences
6个循环.....取模的时候很坑...B. Jzzhu and Sequencestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputJz
2014-07-20 00:33:15 1800
原创 Codeforces 450 C. Jzzhu and Chocolate
二次函数 n*m/ ( (x+1)*(k-x+1) ) 是对称轴>0开口向下的二次函数,直接考虑 x==0||x==n-1||x==m-1等进行判断即可.....C. Jzzhu and Chocolatetime limit per test1 secondmemory limit per test256 megabytesinpu
2014-07-20 00:03:53 1240
原创 Codeforces 448 C. Painting Fence
递归,分治。。。C. Painting Fencetime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputBizon the Champion
2014-07-18 11:43:11 1495
原创 Codeforces 448 D. Multiplication Table
二分判定答案D. Multiplication Tabletime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBizon the Champion i
2014-07-18 07:58:47 1423
原创 POJ 3277 City Horizon
简单的Lazy操作,统计的时候把所有的lazy都推到叶节点就可以了City HorizonTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 15973 Accepted: 4336DescriptionFarmer John has take
2014-07-17 13:35:06 1048
原创 ZOJ 1610 Count the Colors
线段树:延伸标记+暴力更新记得刚学线段树的时候做这题WA了一版。。。。。现在分分钟搞定。。。。Count the ColorsTime Limit: 2 Seconds Memory Limit: 65536 KBPainting some colored segments on a line, some previously painted segm
2014-07-16 23:26:54 1010
原创 Codeforces Round #FF 446 C. DZY Loves Fibonacci Numbers
参考:http://www.cnblogs.com/chanme/p/3843859.html然后我看到在别人的AC的方法里还有这么一种神方法,他预先设定了一个阈值K,当当前的更新操作数j原来:id 0 1 2 3 4 5 6 7 8 9 10d 0 0 0 0 0 0 0 0 0 0 0更新:id 0 1 2 3 4 5 6 7 8
2014-07-15 22:43:26 1207
原创 Codeforces Round #FF (Div. 1) B. DZY Loves Modification
枚举行取了多少次,如行取了i次,列就取了k-i次,如果行列单独贪心考虑然后相加,那么有i*(k-i)个交点是多出来的:dpr[i]+dpc[k-i]-i*(k-i)*p枚举i取最大值。。。。B. DZY Loves Modificationtime limit per test2 secondsmemory limit per test256
2014-07-15 17:40:47 1161
原创 Codeforces Round #FF 446A DZY Loves Sequences
预处理出每个数字可以向后延伸多少,然后尝试将两段拼起来。C. DZY Loves Sequencestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
2014-07-14 18:48:04 1112
原创 POJ 1830 开关问题
简单的高斯消元取模,答案为2^自由变元的数量,但是题目的意思把I,J搞反了,坑爹。。。开关问题Time Limit: 1000MS Memory Limit: 30000KTotal Submissions: 5425 Accepted: 2023Description有N个相同的开关,
2014-07-10 15:52:05 1177
原创 POJ 1222 EXTENDED LIGHTS OUT
异或高斯消元:每个灯的开和关对周围5个格子产生影响,选择一些灯使所有的灯关闭.可以构建一个每个灯对周围影响的30×30矩阵,矩阵的值等于原来的状态。再用高斯消元求解每个灯的状态。EXTENDED LIGHTS OUTTime Limit: 1000MS Memory Limit: 10000KTotal Sub
2014-07-10 00:36:46 1016
原创 Codeforces Round #254 (Div. 2)
水题...A. DZY Loves Chessboardtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDZY loves chessboard,
2014-07-08 15:34:01 1179
原创 HDOJ 4416 Good Article Good sentence
题解转自:http://blog.csdn.net/dyx404514/article/details/88074402012杭州网络赛的一道题,后缀数组后缀自动机都行吧。题目大意:给一个字符串S和一系列字符串T1~Tn,问在S中有多少个不同子串满足它不是T1~Tn中任意一个字符串的子串。 思路:我们先构造S的后缀自动机,然后将每一个Ti在S的SAM上做匹配,类
2014-07-06 16:59:18 1094
原创 SPOJ LCS2 1812. Longest Common Substring II
SPOJ Problem Set (classical)1812. Longest Common Substring IIProblem code: LCS2A string is finite sequence of characters over a non-empty finite set Σ.In this problem, Σ is
2014-07-06 00:26:02 1673
原创 SPOJ SUBLEX 7258. Lexicographical Substring Search
看起来像是普通的SAM+dfs...但SPOJ太慢了......倒腾了一个晚上不是WA 就是RE .....最后换SA写了......Lexicographical Substring SearchTime Limit: 1000MS Memory Limit: Unknown 64bit IO Format: %lld
2014-07-05 15:21:57 1386 1
原创 HDOJ 3518 Boring counting
SAM基本操作 拓扑求每个节点的 最左出现left,最右出现right,出现了几次num ......对于每一个出现两次以上的节点,对其所对应的一串子串的长度范围 [fa->len+1,len] 和其最大间距 right-left比较即可......Boring countingTime Limit: 2000/1000 MS (Java/Others) Memor
2014-07-04 15:08:58 1014
原创 SPOJ 8222 NSUBSTR Substrings
SubstringsTime Limit: 1000MS Memory Limit: Unknown 64bit IO Format: %lld & %llu[Submit] [Go Back] [Status] DescriptionYou are given a string S which cons
2014-07-02 22:50:03 977
原创 HDOJ 1261 字串数
JAVA大数....字串数Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2893 Accepted Submission(s): 679Problem Description一个A和两个B
2014-07-02 12:37:12 1137
原创 UVA 11090 - Going in Cycle!!
二分+SPFA找负环11090 - Going in Cycle!!Time limit: 3.000 seconds#include #include #include #include #include using namespace std;const double INF=1000000000.;struc
2014-07-01 21:50:44 1083
ManicTime Professional v2.5.2.1 简体中文破解版
2014-05-01
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人