自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(93)
  • 资源 (1)
  • 收藏
  • 关注

原创 停车场管理(栈与队列的应用)

自动停车场由一个可停放n 辆车的狭长通道构成,且只有一个入口可供汽车进出。在停车场内,汽车按到达的先后次序,由北向南依次排列(假设入口在最南端)。若停车场内已停满n 辆车,则后来的汽车需在入口外的临时等候便道上等候,当有车要离开时,临时等候便道上的第一辆车即可进入。当自动停车场内某辆车要离开时,必须先将在它之后进入的车辆移出为其让路,待该辆车离开后,其他车辆再按原次序移入自动停车场。每辆车离开

2015-10-09 14:31:18 1708

原创 POJ 2955(区间DP)

#include #include #include using namespace std;int main(){ char s[110]; int dp[110][110]; while(scanf("%s", s) != EOF && s[0] != 'e') { memset(dp, 0, sizeof(dp));

2015-10-04 22:40:45 356

原创 POJ 113

import java.io.*;import java.math.*;import java.util.*;public class Main{ public static void main(String []args) throws Exception{ //BufferedReader cin = new BufferedReader(new Inp

2015-10-03 17:03:31 444

原创 POJ 1503

import java.io.*;import java.math.*;import java.util.*;public class Main{ public static void main(String []args) throws Exception{ //BufferedReader cin = new BufferedReader(new InputStreamRead

2015-10-03 16:58:20 378

原创 POJ 1604

import java.io.*;import java.math.*;import java.util.*;public class Main{ public static void main(String []args) throws Exception { //BufferedReader cin = new BufferedReader(new InputStreamRe

2015-10-03 16:55:59 402

原创 POJ 2305

import java.math.*;import java.util.*;import java.io.*;public class Main{ public static void main(String []args) { Scanner cin = new Scanner (System.in); int n; while(cin.hasNext())

2015-10-03 16:54:36 288

原创 POJ 2325

import java.math.*;import java.util.*;public class Main{ public static void main(String []args) { Scanner cin = new Scanner(System.in); BigInteger zero = new BigInteger(String.valueOf(0));

2015-10-03 16:53:14 361

原创 HDU 3435

#include #include #include #include #include using namespace std;#define maxn 3000#define inf 0x7ffffffint t, n, m, tot;int ans_flow;int head[maxn], p1[maxn], p2[maxn], flag[maxn], dis[maxn]

2015-10-02 11:17:44 383

原创 (最小费用最大流模板)HDU 3488

/* Created by mowenwen ~~~~ 2015.10.01*/#include #include #include #include #include #include using namespace std;#define maxn 10000+10#define inf 0x7fffffffint k, p;int tot;i

2015-10-02 09:35:33 328

原创 两个一元多项式相加(链表 || 顺序表实现)

顺序表实现:#include #include #include #include #include using namespace std;#define maxsize 1000struct Data{ double coef; int exp;};struct List{ Data* elem; int length;};char s[100];

2015-09-23 17:24:00 13341 1

原创 HDU 1281

棋盘游戏Time Limit: 1000MS Memory Limit: 32768KB64bit IO Format: %I64d & %I64uDescription小希和Gardon在玩一个游戏:对一个N*M的棋盘,在格子里放尽量多的一些国际象棋里面的“车”,并且使得他们不能互相攻击,这当然很简单,但是Gardon限制了只有某些格子才可以放,小希还是很轻松的解决了这个

2015-09-07 21:06:23 405

原创 POJ 2392(多重背包)

Space ElevatorTime Limit: 1000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64uDescriptionThe cows are going to space! They plan to achieve orbit by buildin

2015-09-06 22:03:59 406

原创 POJ 1787(完全背包+记录路径)

POJ - 1787Charlie's ChangeTime Limit: 1000MS Memory Limit: 30000KB 64bit IO Format: %I64d & %I64uDescriptionCharlie is a driver of Advanced Cargo Movement, Lt

2015-09-06 21:33:27 433

原创 ZOJ 1149(多重背包)

DividingTime Limit: 2000MS Memory Limit: 65536KB 64bit IO Format: %lld & %lluMarsha and Bill own a collection of marbles. They want to split the collection among themse

2015-09-06 20:34:12 370

原创 HDU 1150

HDU - 1150Machine ScheduleTime Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescriptionAs we all know, machine scheduling is a very class

2015-09-05 10:35:31 320

原创 HDU 2255(KM 模板题)

奔小康赚大钱Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5552    Accepted Submission(s): 2438Problem Description传说在遥远的地方有一个非常富裕的村落,有一

2015-09-04 22:05:16 391

原创 HDU 1533

Going HomeTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3469    Accepted Submission(s): 1780Problem DescriptionOn a grid

2015-09-02 19:39:20 365

原创 连续增广路算法

const int maxn = 110;const int maxm = 5010;struct Edge{ int to, next, c, f;}edge[maxm*10];int head[maxn],dis[maxn],load[maxn],p[maxn];int n;bool flag[maxn];bool spfa(int start,int end){

2015-09-01 22:19:15 467

原创 HDU 3072(强连通+缩点)

Intelligence SystemCrawling in process...Crawling failedTime Limit:1000MS    Memory Limit:32768KB     64bit IO Format:%I64d & %I64u            DescriptionAfter a day, ALPCs f

2015-08-31 21:08:46 711

原创 HDU 3594

HDU - 3594                                                             CactusTime Limit:                                                        1000MS                         Memor

2015-08-31 18:33:10 353

原创 HDU 1827

HDU - 1827Summer HolidayTime Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uTo see a World in a Grain of Sand And a Heaven in a

2015-08-28 10:53:22 680

原创 HDU 3836

HDU - 3836Equivalent SetsTime Limit: 4000MS Memory Limit: 104857KB 64bit IO Format: %I64d & %I64u             DescriptionTo prove two sets A and B a

2015-08-28 10:22:51 667

原创 HDU 1269(Tarjan模板)

HDU - 1269迷宫城堡Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64u             Description为了训练小希的方向感,Gardon建立了一座大城堡,里面有N个房间(N<=10

2015-08-27 11:33:21 337

原创 HDU 4474(神奇的BFS+强剪枝)

HDU - 4474Yet Another Multiple ProblemTime Limit: 20000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64u             DescriptionThere are tons

2015-08-26 20:22:06 694

转载 kosaraju算法

#include#include#includeusing namespace std;bool map[100][100]; //记录图形的边bool visited[100]; //记录点是否是被访问过了。int dfn[100]; //记录点深度优先搜索的顺序int dotn; //记录点的个数void init() //初始

2015-08-24 16:27:56 466

原创 HDU 1068

HDU - 1068Girls and BoysTime Limit: 10000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64u             Descriptionthe second year of the university some

2015-08-24 14:12:54 332

原创 POJ 1422 (最少路径覆盖)

Air RaidTime Limit: 1000MS Memory Limit: 10000KB 64bit IO Format: %I64d & %I64u             DescriptionConsider a town where all the streets are one-way and eac

2015-08-24 12:45:32 563

原创 POJ 3041

AsteroidsTime Limit: 1000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64u             DescriptionBessie wants to navigate her spaceship through a dangero

2015-08-21 20:07:06 456

原创 POJ 1469

COURSESTime Limit: 1000MS Memory Limit: 10000KB 64bit IO Format: %I64d & %I64uSubmitStatus DescriptionConsider a group of N students and P courses. Each stu

2015-08-21 19:21:00 313

原创 POJ 3281

DiningTime Limit: 2000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64u             DescriptionCows are such finicky eaters. Each cow has a preference f

2015-08-21 18:33:01 455

原创 POJ 1459

A power network consists of nodes (power stations, consumers and dispatchers) connected by power transport lines. A node u may be supplied with an amount s(u) >= 0 of power, may produce an amount 0 <=

2015-08-21 18:17:37 681

原创 POJ 2761(求区间第k小值)

Feed the dogsTime Limit: 6000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64uSubmitStatus DescriptionWind loves pretty dogs very much, and she has n pe

2015-08-20 16:43:21 951

原创 ZOJ 3201

Tree of TreeTime Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %lld & %lluDescriptionYou're given a tree with weights of each node, you need to find the ma

2015-08-20 00:11:29 994 3

原创 POJ 1463

Strategic gameTime Limit: 2000MS Memory Limit: 10000KB 64bit IO Format: %I64d & %I64uDescriptionBob enjoys playing computer games, especially strategic games, but

2015-08-19 18:06:43 333

原创 POJ 2342

Anniversary partyTime Limit: 1000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64uDescriptionThere is going to be a party to celebrate the 80-th Anniversary

2015-08-19 17:20:58 561

原创 POJ 1273

Drainage DitchesTime Limit: 1000MS Memory Limit: 10000KB 64bit IO Format: %I64d & %I64uEvery time it rains on Farmer John's fields, a pond forms over Bessie's f

2015-08-19 11:36:22 460

原创 POJ 4014

ACM ICPC 2011–2012, NEERC, Northern Subregional Contest St Petersburg, October 29, 2011Problem D. DiceInput file: dice.inOutput file: dice.out Time limit: 3 seconds Memory limit: 256 m

2015-08-18 22:50:42 1113

原创 POJ 4012

题目链接:http://poj.org/problem?id=4012Problem B. Black Square Input file: black.in Output file: black.out Time limit: 3 secondsMemory limit: 256 megabytesInspired by Kazimir Malevic

2015-08-18 22:37:37 652

原创 POJ 4011

ACM ICPC 2011–2012, NEERC, Northern Subregional ContestSt Petersburg, October 29, 2011Problem A. Automated Telephone ExchangeInput file: ate.inOutput file: ate.outTime limit: 3 secondsMemo

2015-08-18 22:18:09 480

原创 POJ 1442(treap || 优先队列)

treap套用模板即可:

2015-08-18 00:07:06 925

六种排序算法

冒泡,选择,归并,堆,插入,快速排序六种算法。

2016-01-08

空空如也

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

TA关注的人

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