自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 POJ 3254 Corn Fields

Corn FieldsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 5764 Accepted: 3053DescriptionFarmer John has purchased a lush new rectangular pasture compos

2013-11-12 19:36:20 770

转载 INT 21H 指令说明及使用方法

转自:INT 21H 指令说明及使用方法很多初学汇编语言的同学可能会对INT 21H这条指令感到困惑,不知道是什么意思,下面就以一段简单的程序为大家讲解:例如:需要键盘输入,并且回显。AH的值需要查表取得,表在下面指令:MOV AH,01     INT 21H通过这样两条指令,输入的字符就会被存储在AL中。 表:DOS系统功能调INT 21HA

2013-10-27 22:23:08 1604

原创 POJ 2096 Collecting Bugs

Collecting BugsTime Limit: 10000MS Memory Limit: 64000KTotal Submissions: 1794 Accepted: 834Case Time Limit: 2000MS Special JudgeDescriptionIvan is fond o

2013-10-07 21:46:58 773

原创 POJ 3744 Scout YYF I

Scout YYF ITime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4090 Accepted: 1050DescriptionYYF is a couragous scout. Now he is on a dangerous mission whic

2013-10-05 17:11:47 833

原创 POJ 1753 Flip Game

Flip GameTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 26252 Accepted: 11333DescriptionFlip game is played on a rectangular 4x4 field with two-sided p

2013-10-04 15:51:04 757

原创 POJ 2411 Mondriaan's Dream

Mondriaan's DreamTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 9975 Accepted: 5772DescriptionSquares and rectangles fascinated the famous Dutch painte

2013-10-04 10:25:11 759

原创 POJ 1185 炮兵阵地

炮兵阵地Time Limit: 2000MS Memory Limit: 65536KTotal Submissions: 16310 Accepted: 6212Description司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),也可能是平

2013-10-02 21:28:42 667

原创 CSU 1317 Find the max Link

1317: Find the max LinkTime Limit: 1 Sec  Memory Limit: 128 MB[Submit][Status][Web Board]Description由N个点组成的无向图,每条边有对应的权值,保证每两点之间存在且仅存在一条路径,一条路径的权值为其所有边的权值之和,请找出一条路径,对于图中每个点至多经过一次,并且这条路

2013-09-01 16:04:08 848

原创 Hdu 4691 Front compression

点击打开链接后缀数组错误的代码。。。。 未找到原因#include#include#include#define maxn 110000using namespace std;char s[maxn];__int64 Star[maxn],End[maxn];__int64 sa[maxn],t[maxn],t2[maxn],c[maxn],n;__int6

2013-08-26 17:06:00 751

原创 LA 3523 - Knights of the Round Table

题目链接:点击打开链接训练指南P316//割顶的bccno无意义#include#include#include#includeusing namespace std;#define maxn 1100struct Edge{ int u,v;};int pre[maxn],iscut[maxn],bccno[maxn],dfs_clock,b

2013-08-19 18:24:35 815

原创 计算点-双连通分量算法

//割顶的bccno无意义#include#include#include#includeusing namespace std;#define maxn 1100struct Edge{ int u,v;};int pre[maxn],iscut[maxn],bccno[maxn],dfs_clock,bcc_cnt;stack S;vector G[maxn

2013-08-19 16:59:48 980

原创 HDU 4666 Hyperspace

HyperspaceTime Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)Problem DescriptionThe great Mr.Smith has invented a hyperspace particle generator. The dev

2013-08-15 16:35:58 702

原创 Hdu 1255 覆盖的面积

覆盖的面积Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Problem Description给定平面上若干矩形,求出被这些矩形覆盖过至少两次的区域的面积. Input输入数据的第一行是一个正整数T(1注意:本

2013-08-15 10:20:03 892

原创 Hdu 1542 Atlantis

AtlantisTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionThere are several ancient Greek texts that contain descriptions of the fable

2013-08-15 10:16:50 1055

转载 ACM算法训练

转载的0.0经典训练参照,不解释了,很好~1.图论2.数据结构3.搜索4.动态规划5.模拟6.数学7.计算几何8.博弈论9.字符串=========================================初期:一.基本算法:(1)枚举. (poj1753,poj2965)(2)贪心(poj1328,poj2109,poj2

2013-08-13 09:39:39 790

原创 POJ 3667 Hotel

HotelTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 9597 Accepted: 4113DescriptionThe cows are journeying north to Thunder Bay in Canada to gain cult

2013-08-13 09:34:16 720

原创 后缀数组 (由倍增算法构造)

//倍增算法构造后缀数组//时间复杂度O(nlogn) 空间复杂度O(n)#include#include#includeusing namespace std;#define MAXN 110000int n; //n为处理字符串s的长度char s[MAXN],tmp[MAXN]; //s为输入的字符串int

2013-08-01 15:41:11 1114

原创 Hdu 4628 Pieces

Pieces                   Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Problem DescriptionYou heart broke into pieces.My string broke into pieces.But

2013-07-31 14:36:48 687

原创 POJ 2528 Mayor's posters

Mayor's postersDescriptionThe citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their whim

2013-07-29 16:49:04 775

原创 HDU 4619 Warm up 2

Warm up 2Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Problem Description  Some 1×2 dominoes are placed on a plane. Each dominoe is placed either hori

2013-07-26 21:59:28 999

原创 Hdu 4618 Palindrome Sub-Array

Palindrome Sub-ArrayTime Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Problem Description  A palindrome sequence is a sequence which is as same as its re

2013-07-26 20:09:57 831

原创 HDU 4607 Park Visit

Park Visit                                                Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionClaire and her little friend, yk

2013-07-26 12:06:10 810

原创 HDU 4604 Deque

DequeTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionToday, the teacher gave Alice extra homework for the girl weren't attentive in hi

2013-07-25 17:47:02 966

原创 NOI 2003 逃学的小孩

提交网址:http://acm.nankai.edu.cn/p1092.html1092: 逃学的小孩 Time Limit: 1500 ms    Memory Limit: 32000 kB  Judge type: Multi-casesFont Style:AaAaAaChris家的电话铃响起了,里面传出了Chris的老师焦急的声音:“喂,是Ch

2013-07-23 13:58:42 1586

原创 树形DP总结

必要条件:子树之间不可以相互干扰,如果本来是相互干扰的,                    那么我们必须添加变量使得他们不相互干扰。 树形动态规划通常从叶节点(边界)开始逐步向上一层的节点(即父节点)进行状态方程的转移,直到根节点。 树形分组背包

2013-07-22 18:53:38 868

原创 Vijos 1100 加分二叉树

描述设一个n个节点的二叉树tree的中序遍历为(l,2,3,…,n),其中数字1,2,3,…,n为节点编号。每个节点都有一个分数(均为正整数),记第i个节点的分数为di,tree及它的每个子树都有一个加分,任一棵子树subtree(也包含tree本身)的加分计算方法如下:subtree的左子树的加分× subtree的右子树的加分+subtree的根的分数若某个子树为空,规定其加分

2013-07-22 16:37:16 942

原创 Hdu 2412 Party at Hali-Bula

Party at Hali-BulaTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionDear Contestant,I'm going to have a party at my villa at Hali-Bu

2013-07-22 12:30:42 1034

原创 Hdu 1054 Strategic Game

Strategic GameTime Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3714    Accepted Submission(s): 1630Problem DescriptionBob enjoys pl

2013-07-22 10:14:31 910

原创 Hdu 1520 Anniversary party

Anniversary partyTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionThere is going to be a party to celebrate the 80-th Anniversary of th

2013-07-21 15:36:51 774

原创 POJ 1947 Rebuilding Roads

Rebuilding RoadsTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 7940 Accepted: 3534DescriptionThe cows have reconstructed Farmer John's farm, with its N b

2013-07-21 13:31:26 761

原创 Hdu 1728 逃离迷宫

逃离迷宫                                            Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Problem Description  给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想

2013-07-20 17:52:17 743

原创 POJ 3345 Bribing FIPA

Bribing FIPATime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 3209 Accepted: 1016DescriptionThere is going to be a voting at FIPA (Fédération Internatio

2013-07-20 15:18:06 845

原创 POJ 2486 Apple Tree

Apple TreeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6148 Accepted: 1986DescriptionWshxzt is a lovely girl. She likes apple very much. One day HX tak

2013-07-20 11:16:59 906

原创 博弈总结

博弈题总的思路是:步骤1:将所有终结位置标记为必败点(P点);步骤2: 将所有一步操作能进入必败点(P点)的位置标记为必胜点(N点)步骤3:如果从某个点开始的所有一步操作都只能进入必胜点(N点) ,则将该点标记为必败点(P点) ;步骤4: 如果在步骤3未能找到新的必败(P点),则算法终止;否则,返回到步骤2。一般的简单题通过分析出简单数据的答案找出规律。规律

2013-07-19 22:37:16 784

原创 Poj 1155 TELE

TELETime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2983 Accepted: 1525DescriptionA TV-network plans to broadcast an important football match. Their netwo

2013-07-19 09:39:29 877

原创 ural 1108 Binary Apple Tree

二叉苹果树题目意思:有一棵苹果树,苹果树的是一棵二叉树,共N个节点,树节点编号为1~N,编号为1的节点为树根,边可理解为树的分枝,每个分支都长着若干个苹果,现在要要求减去若干个分支,保留M个分支,要求这M个分支的苹果数量最多。树形DP将边的值转化成了点的值,方便处理#include#includeusing namespace std;#def

2013-07-18 16:52:34 1076

原创 Zoj 3529 A Game Between Alice and Bob

1017#include#includeint SG[5100000];int num[110000];void fun(){ __int64 i,j,tmp; for(i=2;i<=5000000;i++) { if(SG[i]==0) { for(j=i;j<=5000000;j+=i) { tmp=j; while(!

2013-07-18 14:46:50 1228

原创 Hdu 1729 Stone Game

Stone GameTime Limit: 5000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Problem DescriptionThis game is a two-player game and is played as follows:1. There are n

2013-07-18 09:47:34 748

原创 Hdu 1536 S-Nim

S-NimTime Limit: 5000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/OthersProblem DescriptionArthur and his sister Caroll have been playing a game called Nim for some time now

2013-07-17 19:29:07 786

原创 Hdu 1907 John

JohnTime Limit: 5000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Problem DescriptionLittle John is playing very funny game with his younger brother. There is one big

2013-07-17 17:59:39 953

空空如也

空空如也

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

TA关注的人

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