自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

EventQueue的博客

刷题囧。。。

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

原创 UVa 548 Tree 根据后序遍历和中序遍历建树后DFS

#include #include #include #include #include #include #define PAUSE system("pause")using namespace std;const int maxv = 10000 + 10;//lch和rch分别记录当前节点的左右子树的根节点int in_order[maxv], post_order[m

2016-04-28 12:08:17 463

原创 UVa 122 Trees on the level 建立二叉树BFS层序遍历

#include #include #include #include using namespace std;const int maxn = 256 + 10;char s[maxn];struct node { int d; bool has_v; node *left, *right; node() : d(0), left(NULL), right(NULL)

2016-04-27 22:04:11 571

原创 UVa 12657 Boxes in a Line 数组模拟双向循环链表

#include #include #include using namespace std;const int maxn = 100000 + 10;int L[maxn], R[maxn];void link(int X, int Y) { R[X] = Y; L[Y] = X;}void Swap(int& x, int& y) { int t = x; x =

2016-04-26 21:42:57 823

原创 UVa 11988 Broken Keyboard (a.k.a. Beiju Text) 数组模拟单向链表

#include #include #include using namespace std;const int maxn = 100000 + 5;//last表示最后一个字符是s[last],cur表示光标位于s[cur]后面//Next[i]表示s[i]右面的字符编号(即在s中的下标)//last其实相当于指针链表中的指向尾节点的指针,而Next[i]相当于/*指针链表

2016-04-25 20:56:21 505

原创 poj3414 Pots BFS

PotsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 13400 Accepted: 5641 Special JudgeDescriptionYou are given two pots, having the volume of A an

2016-04-24 20:29:43 559

原创 hdu2614 Beat BFS or DFS

BeatTime Limit: 6000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1286    Accepted Submission(s): 751Problem DescriptionZty is a man that alwa

2016-04-24 19:49:16 572

原创 hdu4283 You Are the One 区间dp 记忆化搜索or递推

You Are the OneTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3032    Accepted Submission(s): 1352Problem Description  The TV s

2016-04-23 21:28:10 1655 3

原创 PAT (Advanced Level) Practise 1109. Group Photo (25) 结构体排序

1109. Group Photo (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueFormation is very important when taking a grou

2016-04-23 16:05:20 836

原创 PAT (Advanced Level) Practise 1107. Social Clusters (30) 并查集

1107. Social Clusters (30)时间限制1000 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueWhen register on a social network, you ar

2016-04-23 14:08:06 486

原创 PAT (Advanced Level) Practise 1105. Spiral Matrix (25) 蛇形填数

1105. Spiral Matrix (25)时间限制150 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThis time your job is to fill a sequence of

2016-04-23 13:55:42 447

原创 PAT (Advanced Level) Practise 1102. Invert a Binary Tree (25) 二叉树的层序和中序遍历

1102. Invert a Binary Tree (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThe following is from Max Howell @twi

2016-04-23 13:48:48 610

原创 hdu4287 Intelligent IME STLmap散列查找

Intelligent IMETime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4309    Accepted Submission(s): 2018Problem Description  We all u

2016-04-21 21:23:08 660

原创 PAT (Advanced Level) Practise 1111. Online Map (30) Dijstra单源最短路

1111. Online Map (30)时间限制300 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueInput our current position and a destination, a

2016-04-20 20:40:34 710

原创 hdu4278 Faulty Odometer 八进制转十进制

Faulty OdometerTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1875    Accepted Submission(s): 1295Problem Description  You are

2016-04-19 21:40:37 488

原创 PAT (Advanced Level) Practise 1114 Family Property (25) 并查集orDFS

1114. Family Property (25)时间限制150 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThis time, you are supposed to help us col

2016-04-18 20:14:31 865

原创 hdu4717 The Moving Points 三分求函数最小值

The Moving PointsTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1754    Accepted Submission(s): 696Problem DescriptionThere are

2016-04-15 20:49:11 570

原创 hdu1540 Tunnel Warfare 线段树区间合并

Tunnel WarfareTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6565    Accepted Submission(s): 2527Problem DescriptionDuring the

2016-04-15 15:56:27 408

原创 hdu1203 I NEED A OFFER! 01背包

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

2016-04-14 21:02:53 561

原创 hdu5122 K.Bro Sorting

K.Bro SortingTime Limit: 2000/2000 MS (Java/Others)    Memory Limit: 512000/512000 K (Java/Others)Total Submission(s): 1960    Accepted Submission(s): 891Problem DescriptionMatt’s frie

2016-04-14 20:57:26 397

原创 hdu4722 Good Numbers 规律题

Good NumbersTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3839    Accepted Submission(s): 1224Problem DescriptionIf we sum up

2016-04-11 21:29:07 513

原创 hdu4723 How Long Do You Have to Draw 贪心

How Long Do You Have to DrawTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 322    Accepted Submission(s): 128Problem Description

2016-04-11 16:03:16 860

原创 hdu1224 Free DIY Tour DFS或者dp

Free DIY TourTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5744    Accepted Submission(s): 1835Problem DescriptionWeiwei is a

2016-04-09 10:26:30 431

原创 hdu1160 FatMouse's Speed 最长上升子序列 LIS

FatMouse's SpeedTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13391    Accepted Submission(s): 5893Special JudgeProblem Descriptio

2016-04-05 21:41:50 459

原创 poj2249 Binomial Showdown 求组合数

Binomial ShowdownTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 18925 Accepted: 5788DescriptionIn how many ways can you choose k elements out of n el

2016-04-05 18:21:49 1173

原创 codeforces 651C Watchmen

C. Watchmentime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWatchmen are in a danger and Doctor Manhattan t

2016-04-05 14:26:43 502

原创 poj3667 Hotel 线段树延迟更新 区间合并

HotelTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 15205 Accepted: 6583DescriptionThe cows are journeying north to Thunder Bay in Canada to gain cul

2016-04-04 15:23:38 819

原创 JAVA大数类 BigInteger和BigDecimal用法

BigInteger四则运算import java.math.BigInteger;import java.util.Scanner;public class Main { public static void main(String[] args) { BigInteger num1, num2; Scanner in = new Scanner(S

2016-04-03 21:47:53 1126

原创 hdu1181 变形课 BFS 判断连通性

变形课Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 20132    Accepted Submission(s): 7240Problem Description呃......变形课上Harry碰到了一

2016-04-03 20:17:31 662

原创 poj1321 棋盘问题 DFS

棋盘问题Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 32239 Accepted: 16002Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编

2016-04-03 20:11:43 411

原创 hdu5655 CA Loves Stick JAVA大数

CA Loves StickTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 130    Accepted Submission(s): 53Problem DescriptionCA loves to

2016-04-02 21:52:26 539

原创 poj3468 A Simple Problem with Integers 线段树延迟标记区间更新区间求和

A Simple Problem with IntegersTime Limit: 5000MS Memory Limit: 131072KTotal Submissions: 86916 Accepted: 26983Case Time Limit: 2000MSDescriptionYou have N

2016-04-01 09:28:13 409

空空如也

空空如也

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

TA关注的人

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