自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

MaxKrystal

博客已迁移至 http://zhengboyang.com 。

  • 博客(30)
  • 收藏
  • 关注

原创 博客已迁移至 http://zhengboyang.com 。

欢迎大家继续关注噢!

2016-03-17 14:02:16 286

原创 POJ 2796 Feel Good

Feel GoodTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 10949 Accepted: 2990Case Time Limit: 1000MS Special JudgeDescriptionBill is develop

2015-06-26 12:41:53 336

原创 2015广东省赛总结

2015广东省赛总结 今年的广东省省赛是在中山大学举办的,都说这次省赛是省出来的,有人说“中大把省赛办出了校赛的感觉”,然而感觉其实这些都无关紧要,对于我来说,关键是题目不要坑人就行…… 废话不多说,正式开始比赛后,我们队按照一直以来的习惯分别读题,我从前面开始读,境炫从中间向两边读,立伟从后面开始读。A题一开始读并不能读懂,由于坚信一定有水题,所以没仔细想就直接跳过了,然后开始读

2015-06-07 18:53:23 709

原创 POJ 1661 Help Jimmy

G - Help JimmyTime Limit:1000MS     Memory Limit:10000KB     64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 1661Description"Help Jimmy" 是在下图所示的场景上完成的游戏。 场景中包括多个长

2015-06-07 17:31:44 1103

原创 Codeforces Round #305 (Div.2) D

B. Mike and Feettime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMike is the president of country What-The-F

2015-05-31 11:36:32 302

原创 POJ 2559 Largest Rectangle in a Histogram

Largest Rectangle in a HistogramTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 16277 Accepted: 5261DescriptionA histogram is a polygon composed of a

2015-05-31 11:14:19 323

原创 POJ 3320 Jessica's Reading Problem

Jessica's Reading ProblemTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7851 Accepted: 2511DescriptionJessica's a very lovely girl wooed by lots of b

2015-05-29 07:20:17 497

原创 Codeforces Round #304 (Div. 2) D. Soldier and Number Game

D. Soldier and Number Gametime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwo soldiers are playing a game.

2015-05-29 06:55:35 309

原创 ZOJ 3780 Paint the Grid Again

Paint the Grid AgainTime Limit: 2 Seconds      Memory Limit: 65536 KBLeo has a grid with N × N cells. He wants to paint each cell with a specific color (either black or white).Leo has a magi

2015-05-20 13:32:32 323

原创 谈谈匈牙利算法

最近学习了图论的一个新算法——匈牙利算法(感觉图论真是太有趣了!逃 自己也尝试过了几道POJ的题目,为避免以后忘记,特地写一下总结,顺便加深理解。 什么是二分图?什么是二分图匹配?等等这些问题这里并不会说明,您可以谷歌一下绝对是一大把。因为这篇博文的目的主要是为了加深理解,所以这里假定大家都或多或少知道匈牙利算法的原理或实现。 简单来说,匈牙利算法可以用来求二分图的最大匹配

2015-05-12 22:56:16 606

原创 Acdream 1729 Crime

CrimeTime Limit: 2000/1000MS (Java/Others) Memory Limit: 262144/131072KB (Java/Others)Submit Statistic Next ProblemProblem Description发生案件了。。。。Losanto的饭卡不见了。。。经过观察,警方锁定了n个嫌疑人,打算进行集中审问。。。只有

2015-05-11 22:34:50 578

原创 输出最长公共子序列

1006 最长公共子序列Lcs基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 给出两个字符串A B,求A与B的最长公共子序列(子序列不要求是连续的)。比如两个串为: abcicbaabdkscab ab是两个串的子序列,abc也是,abca也是,其中abca是这两个字符串最长的子序列。Input第1行:字符串A第2行:字符串

2015-05-11 20:24:59 1506 1

原创 最短路问题路径还原

这里以dijkstra算法的路径还原为例,其他算法也可以用类似的方法进行最短路的还原。//Dijkstra_002.cpp -- 最短路问题路径还原#include #include #include #include #include #include #include #include #include typedef long long ll;using names

2015-04-09 08:01:33 474

原创 Floyd-Warshall算法

//Floyd-Warshall_001.cpp -- 两点间最短路#include #include #include #include #include #include #include #include #include typedef long long ll;using namespace std;const int INF = 0x3f3f3f3f;cons

2015-04-09 00:29:22 301

原创 Bellman-Ford算法

//Bellman-Ford_001.cpp -- 单源最短路#include #include #include #include #include #include #include #include #include typedef long long ll;using namespace std;const int INF = 0x3f3f3f3f;const i

2015-04-08 20:30:33 284

原创 Dijkstra算法(两种写法)

//Dijkstra_001.cpp -- 单源最短路#include #include #include #include #include #include #include #include #include typedef long long ll;using namespace std;const int INF = 0x3f3f3f3f;const int m

2015-04-08 20:27:27 939

原创 多重部分和问题

//multisum_001.cpp -- 多重部分和#include #include #include #include #include #include #include #include #include typedef long long ll;using namespace std;const int maxN = 100 + 10;const int ma

2015-04-08 09:13:00 335

原创 01背包经典问题

//zeroonepack_001.cpp -- 01背包#include #include #include #include #include #include #include #include #include #include #include typedef long long ll;using namespace std;const int maxn =

2015-04-07 21:56:35 238

原创 Section 1.1 PROB Friday the Thirteenth

Friday the ThirteenthIs Friday the 13th really an unusual event?That is, does the 13th of the month land on a Friday less often than on any other day of the week? To answer this question, wr

2015-02-20 12:52:28 352

原创 Section 1.1 PROB Greedy Gift Givers

Greedy Gift GiversA group of NP (2 ≤ NP ≤ 10) uniquely named friends has decided to exchange gifts of money. Each of these friends might or might not give some money to any or all of the other fri

2015-02-20 12:27:33 344

原创 Section 1.1 PROB Your Ride Is Here

Your Ride Is HereIt is a well-known fact that behind every good comet is a UFO. These UFOs often come to collect loyal supporters from here on Earth. Unfortunately, they only have room to pick up

2015-02-20 12:05:50 276

原创 Codeforces Round #292 (Div. 2) C. Drazil and Factoria

C. Drazil and Factorialtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDrazil is playing a math game with

2015-02-20 11:01:04 369

原创 Codeforces Round #291 (Div. 2) B. Han Solo and Lazer Gun

B. Han Solo and Lazer Guntime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n Imperial stormtroopers

2015-02-19 22:13:07 804

原创 多重背包转化为01背包的方法与思路

多重背包: 多重背包问题:给定N种物品和一个容量为V的背包,第i种物品的质量为weight[i],价值为value[i],数量是num[i]件。可以任意选择装入背包的物品,求装入背包中物品的总价值。 这种问题和完全背包一样,可以直接套用01背包的动态规划实现,可是很明显效率太低,时间复杂度并没有减少。 这里我们着重讲一下如何采用二进制划分的方法把多重背包拆分成几件物品。思考

2015-02-05 09:46:13 1251 1

原创 背包问题——“01背包”最优方案总数的求解

回忆一下01背包的动态规划状态及状态方程: 设背包容量为M,一共有N件物品,每件物品质量为weight[i],每件物品的价值为value[i]。1) 子问题定义:dp[i][j]表示前i件物品中选取若干件物品放入剩余容量为j的背包中所能得到的最大价值。2) 根据第i件物品放或不放进行决策。 详细细节就不再多说了,我们直接进入正题。在这里的话,最优方案总数就是物品总价值最大的

2015-02-04 19:59:39 2953 2

原创 HDU 2126 Buy the souvenirs

Buy the souvenirsTime Limit: 10000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1283    Accepted Submission(s): 454Problem DescriptionWhen the

2015-02-04 15:31:59 275

原创 HDU 1203 I NEED A OFFER!

I NEED A OFFER!Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 17754    Accepted Submission(s): 7105Problem DescriptionSpeakless

2015-02-04 00:21:15 336

原创 HDU 1114 || POJ 1384 Piggy-Bank

Piggy-BankTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 8288 Accepted: 4016DescriptionBefore ACM can do anything, a budget must be prepared and the ne

2015-02-03 23:55:34 369

原创 Codeforces Round #290(Div.2) B.Fox And Two Dots

B. Fox And Two Dotstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputFox Ciel is playing a mobile puzzle game

2015-02-03 12:37:25 484

原创 Acm寒假训练有感

经过寒假这几天的训练以及比赛,还是有不少感触的。 首先,很明显我的训练方式是有问题的。不够专心就是一个很大弊端。所以才会在第三场队内训练赛只比了不到两个小时就完全崩溃了…借着上厕所一个人跑到天台吹了一会风,也冷静了一下… 我发现我的平时做题的习惯不太好,没有养成解题之后写解题报告,看别人的解题报告的习惯。这样做题的效果是不大的。写解题报告有助于我更加深刻地理解题意,也可以对一些犯的

2015-02-02 23:09:01 681

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除