- 博客(47)
- 资源 (8)
- 收藏
- 关注
原创 ZOJ 3723 Starfruit
恶心的状压DP。。。与炮兵阵地类似。。。多了两个方向。而且发射的炮弹可能被石头挡住。。。。1.因为方向是对称的,所以可以把下面两条边翻上来,考虑这样只要考虑上面的行就行了。。。。2.被石头挡住。。。可以模拟一下3.卡内存。。。。要用滚动数组+把可能的状态存下来StarfruitTime Limit: 4 Seconds Memory Limit:
2014-02-27 22:37:29 1464
原创 HDOJ 4778 Gems Fight!
状压dfs。。。。Gems Fight!Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 327680/327680 K (Java/Others)Total Submission(s): 752 Accepted Submission(s): 321Problem Description
2014-02-26 20:39:50 1786
原创 POJ 3592 Instantaneous Transference
tarjan+缩点+spfa最长路Instantaneous TransferenceTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 5443 Accepted: 1190DescriptionIt was long ago w
2014-02-26 14:11:19 1069
原创 ZOJ 3349 Special Subsequence
线段树优化DP。。。。Special SubsequenceTime Limit: 5000MS Memory Limit: 32768KB 64bit IO Format: %lld & %llu[Submit] [Go Back] [Status] DescriptionThere a s
2014-02-25 14:52:18 1270
原创 HDOJ 3401 Trade
单调队列优化DP :dp[ i ] [ j ] = max{ dp[ i-1 ] [ j ] , dp[ i - w -1 ] [ k ] - ( j - k )*ap[ i ] , dp [ i - w - 1 ] [ k ] + ( k - j )*bp[ i ] }后两项 dp [ i - w - 1 ][ k ] + k* xx - j * xx 且 abs( j -
2014-02-25 01:22:48 1522
原创 HDOJ 1536 S-Nim
S-NimTime Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64u[Submit] [Go Back] [Status] DescriptionArthur and his sister Caroll have been
2014-02-24 12:19:30 1612
原创 HDOJ 3900 Unblock Me
每一块砖头只有两种形状,而且位置情况最多只有5中,数量最多有24个。。。所以可以用一个longlongint来把所有的砖块位置存下来。。。。然后暴力bfs还能跑100msUnblock MeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 125536/65536 K (Java/Others)Total Sub
2014-02-24 08:48:45 1567
原创 ZOJ 3582 Back to the Past
dp[i][j]记录从当前状态到结束状态的期望。。。dp[i][j]=1+segma( dp[i+a][j+b]*P(a,b) ) a 0..n-i b 0..n-j递归就可以了,a==0&&b==0的时候要特判一下Back to the PastTime Limit: 2 Seconds Memory Limit: 65536 KB Spe
2014-02-23 00:38:21 1623
原创 ZOJ 3396 Conference Call
Conference CallTime Limit: 2000MS Memory Limit: 65536KB 64bit IO Format: %lld & %llu[Submit] [Go Back] [Status] DescriptionGood News! Utopia Polycom begi
2014-02-22 21:10:02 1204
原创 ZOJ 2710 Two Pipelines
贪心。。。。Two PipelinesTime Limit: 2 Seconds Memory Limit: 65536 KB Special JudgeThere are two oil pipelines going through Flatland. Each pipeline can be considered as a line on
2014-02-22 18:51:10 1170
原创 HDOJ 4122 Alice's mooncake shop
用单调队列维护一个每天的最低单价。。。Alice's mooncake shopTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2663 Accepted Submission(s): 645Pro
2014-02-21 21:24:20 1546
原创 HDOJ 4081 Qin Shi Huang's National Road System
次小生成树。。。Qin Shi Huang's National Road SystemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2735 Accepted Submission(s): 983
2014-02-21 17:14:30 1170
原创 POJ 1679 The Unique MST
判断次小生成树是否和最小生成树相等The Unique MSTTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 18632 Accepted: 6515DescriptionGiven a connected undirected g
2014-02-21 15:29:27 1070
原创 Codeforces 394 B. Very Beautiful Number
B. Very Beautiful Numbertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputTeacher thinks that we make a lot o
2014-02-21 02:09:17 1304
原创 ZOJ 3587 Marlon's String
KMP,每匹配到一点就记录一下,然后用fail数组把已经匹配到的但是kmp没有记录的点加上。。。。Marlon's StringTime Limit: 2000MS Memory Limit: 65536KB 64bit IO Format: %lld & %llu[Submit] [Go Back] [S
2014-02-20 22:08:09 1266
原创 HDOJ 4080 Stammering Aliens
又用后缀数组做了一遍。。。。c要开很大才能过。。Stammering AliensTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 597 Accepted Submission(s): 224
2014-02-20 14:44:12 2431
原创 ZOJ 3261 Connections in Galaxy War
并查集。。。倒过来统一处理,再正向输出Connections in Galaxy WarTime Limit: 3 Seconds Memory Limit: 32768 KBIn order to strengthen the defense ability, many stars in galaxy allied together and
2014-02-19 22:37:32 1195
原创 HDOJ 1813 Escape from Tetris
IDA*搜索。。。Escape from TetrisTime Limit: 12000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 730 Accepted Submission(s): 162Problem Descript
2014-02-19 13:37:03 1253
原创 HDOJ 2888 Check Corners
二维RMQ模板。。。。Check CornersTime Limit: 2000/10000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1552 Accepted Submission(s): 569Problem Descriptio
2014-02-18 18:06:46 1182
原创 POJ 2286 The Rotation Game
第一次写IDA*。。。。The Rotation GameTime Limit: 15000MS Memory Limit: 150000KTotal Submissions: 4915 Accepted: 1635DescriptionThe rotation game uses a # shaped b
2014-02-18 12:05:12 1607
原创 HDOJ 1401 Solitaire
山寨版的双向BFS。。。正着搜的结果存下来,反着收的结果在正着搜的结果里找。。。SolitaireTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2944 Accepted Submission(s): 915
2014-02-17 22:58:40 1577
原创 Codeforces 395 B2. iwiwi
构造。。。B2. iwiwitime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Codeforces users sometimes
2014-02-17 09:30:52 1291
原创 BZOJ 1588 [HNOI2002]营业额统计
treap的入门题,虽然在splay的论文里看到过这题。。。遇到2个奇葩问题:1:BZOJ 上用srand(time(NULL))会RE 2:这题的数据不完整1588: [HNOI2002]营业额统计Time Limit: 5 Sec Memory Limit: 162 MBSubmit: 6820 Solved: 2250[Submit][Status]Des
2014-02-16 23:00:21 1409
原创 SPOJ 3273 Order statistic set
红果果的treap模板题。。。白书版treapOrder statistic setTime Limit: 2000MS Memory Limit: Unknown 64bit IO Format: %lld & %llu[Submit] [Go Back] [Status] Description
2014-02-16 16:56:02 1283
原创 Codeforces 390 E. Inna and Large Sweet Matrix
主要是树状数组的改段求段操作。。。E. Inna and Large Sweet Matrixtime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard output
2014-02-13 13:38:58 1702
转载 【转】树状数组求区间和的一些常见模型
这一篇树状数组总结的非常全面。。。树状数组求区间和的一些常见模型Posted on 2011-03-19 19:53 Mato_No1 阅读(925) 评论(1) 编辑 收藏 引用 所属分类: 树状数组 树状数组在区间求和问题上有大用,其三种复杂度都比线段树要低很多……有关区间求和的问题主要有以下三个模型(以下设A[1..N]为一个长为N的序列,初始值为全0):(
2014-02-12 22:57:56 995
原创 Codeforces Round#229 DIV2 A,B,C,D
这次的CF很简单,区分度不大。。。A太水了,两个set搞定。。。B太水了没印象。。。C k比较小,可以预处理一遍。。。 D 把格子按i+j排序,选最小的k个就是目标位置。。。倒着输出。。。A. Inna and Alarm Clocktime limit per test1 secondmemory limit per test
2014-02-12 02:20:07 2620
原创 Codeforces 388 C. Fox and Card Game
C. Fox and Card Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFox Ciel is playing a card game with he
2014-02-09 22:02:12 1569
原创 Codeforces B. Fox and Minimal path
将k换成2进制,构造分层的图B. Fox and Minimal pathtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFox Ciel
2014-02-09 17:11:54 1502
原创 SRM 608 div2 500 MysticAndCandiesEasy
Problem Statement TopCoder admin mystic_tc is sitting in front of a table. He found N sealed boxes of candies on the table.He is not sure how many candies each box contains. However, he
2014-02-08 22:36:00 1405
原创 Codeforces 228 div2 A,B,C
全水题。。。。。A. Fox and Number Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFox Ciel is pla
2014-02-08 22:28:46 1558
原创 USACO The Castle
The CastleIOI'94 - Day 1In a stroke of luck almost beyond imagination, Farmer John was sent a ticket to the Irish Sweepstakes (really a lottery) for his birthday. This ticket turned out to have
2014-02-07 23:29:00 1576
原创 我的vim配置和solardark主题
我的vim配置和solardark主题写在一块了。。。。注:F10set nocompatiblesource $VIMRUNTIME/vimrc_example.vimsource $VIMRUNTIME/mswin.vimbehave mswinset autoindent "自动缩进 set gfn=Consolas:h12:cANSI "字体set nu set
2014-02-07 22:18:35 2411 1
原创 HDOJ 1011 Starship Troopers
树形背包。。。。Starship TroopersTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9096 Accepted Submission(s): 2528Problem Descript
2014-02-05 21:55:31 1202
原创 HDOJ 1561 The more, The Better
简单的树形背包。。。The more, The BetterTime Limit: 2000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64u[Submit] [Go Back] [Status] DescriptionACboy很喜
2014-02-05 19:47:33 1203
原创 ZOJ 3201 Tree of Tree
树形背包。。。Tree of TreeTime Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %lld & %llu[Submit] [Go Back] [Status] DescriptionYou're given a
2014-02-05 16:40:41 1138
原创 HDOJ 2196 Computer
经典的树形DP。。。ComputerTime Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64u[Submit] [Go Back] [Status] DescriptionA school bought the
2014-02-05 16:38:38 1103
原创 POJ 3107 Godfather
树形DPGodfatherTime Limit: 2000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64u[Submit] [Go Back] [Status] DescriptionLast years Chicago was
2014-02-05 00:08:25 1211
原创 USACO Hamming Codes
Hamming CodesRob KolstadGiven N, B, and D: Find a set of N codewords (1 <= N <= 64), each of length B bits (1 <= B <= 8), such that each of the codewords is at least Hamming distance of D (1 <=
2014-02-04 19:56:50 1307
原创 USACO Healthy Holsteins
Healthy HolsteinsBurch & KolstadFarmer John prides himself on having the healthiest dairy cows in the world. He knows the vitamin content for one scoop of each feed type and the minimum daily vi
2014-02-04 16:43:16 1285
ManicTime Professional v2.5.2.1 简体中文破解版
2014-05-01
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人