自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(110)
  • 收藏
  • 关注

原创 HDU 1730 - Northcott Game(博弈)

Northcott GameTime Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2784    Accepted Submission(s): 1208Problem Description  Tom和Jerry正在玩一

2014-09-18 20:02:08 665

原创 HDU 1524 - A Chess Game(SG)

A Chess GameTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1407    Accepted Submission(s): 639Problem DescriptionLet's design a new

2014-09-16 09:34:15 573

原创 HDU 1536 - S-Nim(SG)

S-NimTime Limit: 5000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4585    Accepted Submission(s): 1989Problem DescriptionArthur and his sister Ca

2014-09-15 20:28:06 485

原创 ZOJ 3529 - A Game Between Alice and Bob(素因子+博弈)

A Game Between Alice and BobTime Limit: 5 Seconds      Memory Limit: 262144 KB Alice and Bob play the following game. A series of numbers is written on the blackboard. Alice and Bob take tur

2014-05-22 16:30:40 570

原创 STL部分

/*****优先队列结构体重载操作符*****/bool operator<(const cow& rhs) const { return ed>rhs.ed; //可取出右端点最小的。若改成'<'则取出右端点最大的。 } priority_queueque;

2014-05-15 20:23:43 396

转载 图论题目

=============================以下是最小生成树+并查集======================================【HDU】1213         How Many Tables            基础并查集★1272         小希的迷宫            基础并查集★1325&&poj1308     Is It A

2014-04-24 20:53:30 749

原创 CodeForces 214E - Relay Race(二取方格数)

E. Relay Racetime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputFurik and Rubik take part in a relay race. The race wil

2014-03-12 10:55:28 621

原创 CodeForces 204B - Little Elephant and Cards

B. Little Elephant and Cardstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Little Elephant loves to play with c

2014-03-12 10:45:34 796

原创 杂记

稀疏图适合用邻接表,效率和边数量有关;密集图适合用邻接矩阵

2014-02-25 21:26:00 502

原创 POJ 3253 - Fence Repair(贪心)

Fence RepairTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 21562 Accepted: 6886DescriptionFarmer John wants to repair a small length of the fence aro

2014-01-14 00:01:47 614

原创 POJ 3617 - Best Cow Line(贪心)

Best Cow LineTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7377 Accepted: 2322DescriptionFJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annua

2014-01-13 22:57:01 502

原创 POJ 3190 - Stall Reservations(贪心)

Stall ReservationsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2278 Accepted: 811 Special JudgeDescriptionOh those picky N (1 <= N <= 50,000) c

2014-01-13 14:07:59 698

原创 POJ 1328 - Radar Installation(贪心)

Radar InstallationTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 45932 Accepted: 10256DescriptionAssume the coasting is an infinite straight line. La

2014-01-13 13:45:26 468

原创 POJ 2376 - Cleaning Shifts(贪心)

Cleaning ShiftsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9242 Accepted: 2461DescriptionFarmer John is assigning some of his N (1 <= N <= 25,000)

2014-01-13 13:23:48 724

原创 POJ 2718 - Smallest Difference(穷竭搜索)

Smallest DifferenceTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3238 Accepted: 910DescriptionGiven a number of distinct decimal digits, you can for

2014-01-13 12:55:12 587

原创 SGU 271 - Book Pile

271. Book Piletime limit per test: 0.25 sec.memory limit per test: 65536 KBinput: standardoutput: standardThere is a pile of N books on the table. Two types of operations are perfo

2014-01-07 19:15:59 487

原创 SGU 180 - Inversions(逆序数)

180. Inversionstime limit per test: 0.25 sec.memory limit per test: 4096 KBinput: standardoutput: standardThere are N integers (1A[j].InputThe first line of the input

2014-01-07 18:46:46 601

原创 POJ 1502 - MPI Maelstrom(单源最短路)

MPI MaelstromTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 4531 Accepted: 2744DescriptionBIT has recently taken delivery of their new supercomputer,

2013-12-04 18:18:05 612

原创 HDU 2647 - Reward(拓扑排序)

RewardTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3001    Accepted Submission(s): 899Problem DescriptionDandelion's uncle is

2013-10-04 21:41:21 512

原创 HDU 2923 - Einbahnstrasse(floyd)

EinbahnstrasseTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1626    Accepted Submission(s): 451Problem DescriptionEinbahnstra

2013-10-04 21:31:11 529

原创 POJ 3461 - Oulipo(KMP)

OulipoTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 18241 Accepted: 7323DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La

2013-10-04 21:23:41 588

原创 POJ 3026 - Borg Maze(最小树+BFS)

Borg MazeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7226 Accepted: 2429DescriptionThe Borg is an immensely powerful race of enhanced humanoids fr

2013-10-04 21:17:12 485

原创 POJ 3264 - Balanced Lineup(线段树)

Balanced LineupTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 29686 Accepted: 14001Case Time Limit: 2000MSDescriptionFor the daily milking, Far

2013-10-04 21:08:38 461

原创 POJ 2139 - Six Degrees of Cowvin Bacon(floyd)

Six Degrees of Cowvin BaconTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2228 Accepted: 1039DescriptionThe cows have been making movies lately, so t

2013-10-04 21:06:23 486

原创 HDU 1035 - Robot Motion

Robot MotionTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5352    Accepted Submission(s): 2492Problem DescriptionA robot h

2013-10-04 20:51:08 543

原创 POJ 3273 - Monthly Expense(二分)

Monthly ExpenseTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 11178 Accepted: 4579DescriptionFarmer John is an astounding accounting wizard and has r

2013-10-04 20:48:04 514

原创 POJ 3268 - Silver Cow Party(dijkstra)

Silver Cow PartyTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 10898 Accepted: 4836DescriptionOne cow from each of N farms (1 ≤ N ≤ 1000) convenientl

2013-10-04 20:36:46 476

原创 POJ 1789 - Truck History(最小生成树)

Truck HistoryTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 15445 Accepted: 5933DescriptionAdvanced Cargo Movement, Ltd. uses trucks of different typ

2013-09-23 13:42:11 427

原创 POJ 1751 - Highways(最小生成树)

HighwaysTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 7371 Accepted: 2035 Special JudgeDescriptionThe island nation of Flatopia is perfectly fla

2013-09-21 17:50:43 543

原创 UVA 10006 - Carmichael Numbers(快速幂取模)

Carmichael Numbers An important topic nowadays in computer science is cryptography. Some people even think that cryptography is the only important field in computer science, and that lif

2013-09-21 17:37:25 556

原创 HDU 1166 - 敌兵布阵(树状数组)

敌兵布阵Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 32011    Accepted Submission(s): 13740Problem DescriptionC国的死对头A国这段时间正在进行军事演

2013-09-21 17:29:34 490

原创 POJ 2456 - Aggressive cows(二分)

Aggressive cowsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4852 Accepted: 2384DescriptionFarmer John has built a new long barn, with N (2 His

2013-09-21 17:26:09 605

原创 POJ 1458 & HDU 1159 - Common Subsequence(最长公共子序列)

Common SubsequenceTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 34536 Accepted: 13667DescriptionA subsequence of a given sequence is the given seque

2013-09-21 17:23:17 504

原创 POJ 3069 - Saruman's Army

Saruman's ArmyTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2727 Accepted: 1373DescriptionSaruman the White must lead his army along a straight pa

2013-09-21 17:19:04 571

原创 POJ 1836 - Alignment(最长递增子序列)

AlignmentTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 11559 Accepted: 3684DescriptionIn the army, a platoon is composed by n soldiers. During the m

2013-09-21 17:03:04 581

原创 HDU 1754 - I Hate It(线段树)

Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input本题目包含多组测试,请处理到文件结束。 在每个测试的第一行,有两个正整数 N 和

2013-09-21 16:50:04 459

原创 UVA 567 - Risk(最短路)

DescriptionRisk is a board game in which several opposing players attempt to conquer the world. The gameboard consists of a world map broken up into hypothetical countries. During a player's turn,

2013-09-21 16:45:20 612

转载 几何模板

#include #include #include using namespace std;const double EPS=1e-8;const double PI=acos(-1.0);int dcmp(double x){ if (fabs(x)<EPS) return 0; return x>0?1:-1;}struct point{ doub

2013-09-21 16:40:21 511

原创 HDU 1253 - 胜利大逃亡(三维搜索)

DescriptionIgnatius被魔王抓走了,有一天魔王出差去了,这可是Ignatius逃亡的好机会.魔王住在一个城堡里,城堡是一个A*B*C的立方体,可以被表示成A个B*C的矩阵,刚开始Ignatius被关在(0,0,0)的位置,离开城堡的门在(A-1,B-1,C-1)的位置,现在知道魔王将在T分钟后回到城堡,Ignatius每分钟能从一个坐标走到相邻的六个坐标中的其中一个

2013-09-21 16:35:45 660

原创 CodeForces 165B - Burning Midnight Oil(二分)

B. Burning Midnight Oiltime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day a highly important task was

2013-09-17 21:44:33 928

空空如也

空空如也

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

TA关注的人

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