自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 资源 (17)
  • 收藏
  • 关注

原创 hdu 1253 胜利大逃亡(三维bfs)

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

2014-12-30 22:35:04 535

原创 hdu 1181 变形课(dfs)

Problem Description呃......变形课上Harry碰到了一点小麻烦,因为他并不像Hermione那样能够记住所有的咒语而随意的将一个棒球变成刺猬什么的,但是他发现了变形咒语的一个统一规律:如果咒语是以a开头b结尾的一个单词,那么它的作用就恰好是使A物体变成B物体. Harry已经将他所会的所有咒语都列成了一个表,他想让你帮忙计算一下他是否能完成老师的作业,将一个B(

2014-12-30 20:31:06 487

原创 hdu 2553 N皇后问题(dfs)

Problem Description在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。你的任务是,对于给定的N,求出有多少种合法的放置方法。 Input共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束。 Output

2014-12-30 19:59:23 473

原创 hdu 4016 Magic Bitwise And Operation(dfs)

Problem DescriptionGiven n integers, your task is to pick k out of them so that the picked number are minimum when do bitwise “AND” among all of them.For example, there are three integers 5, 6 a

2014-12-24 21:05:24 662

原创 二叉堆之优先队列

一、优先队列不同于普通队列采用先进先出的队列元素存取方式。插入队列元素时按照一定的规则插入,每次都是取队列中优先级最高的元素。在操作系统中,调度程序必须决定在什么时候运行哪个进程。一般来说,短的作业是需要尽可能快地完成,也就是说,短的作业应该拥有优先权。这种特殊的应用将由一种特殊的队列来完成,这种数据结构叫做优先队列。二、最基本的两种操作  优先队列具备的最基本的两种操作,是插入和

2014-12-22 21:41:54 611

原创 hdu 1258 Sum It Up

Problem DescriptionGiven a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For example, if t=4, n=6, and the list is [4,3,2,2,1,1],

2014-12-15 15:51:48 447

原创 hdu 2952 Counting Sheep

Problem DescriptionA while ago I had trouble sleeping. I used to lie awake, staring at the ceiling, for hours and hours. Then one day my grandmother suggested I tried counting sheep after I'd gone

2014-12-15 15:27:03 397

原创 hdu 1312 Red and Black

Problem DescriptionThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adja

2014-12-15 14:57:36 359

原创 hdu 1518 Square

Problem DescriptionGiven a set of sticks of various lengths, is it possible to join them end-to-end to form a square? InputThe first line of input contains N, the number of test ca

2014-12-14 21:59:57 503

原创 hdu 5143 NPY and arithmetic progression

Problem DescriptionNPY is learning arithmetic progression in his math class. In mathematics, an arithmetic progression (AP) is a sequence of numbers such that the difference between the consecutiv

2014-12-14 20:01:15 685

原创 poj 1847 Tram(最短路径)

DescriptionTram network in Zagreb consists of a number of intersections and rails connecting some of them. In every intersection there is a switch pointing to the one of the rails going out of the

2014-12-08 19:52:25 598

原创 poj 1837 Balance

DescriptionGigel has a strange "balance" and he wants to poise it. Actually, the device is different from any other ordinary balance. It orders two arms of negligible weight and each arm's lengt

2014-12-07 23:22:27 466

原创 poj1745 Divisibility

DescriptionConsider an arbitrary sequence of integers. One can place + or - operators between integers in the sequence, thus deriving different arithmetical expressions that evaluate to different

2014-12-07 21:32:30 463

原创 poj 1426 Find The Multiple

DescriptionGiven a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not greater tha

2014-12-05 21:59:39 403

原创 poj 2531Network Saboteur

DescriptionA university network is composed of N computers. System administrators gathered information on the traffic between nodes, and carefully divided the network into two subnetworks in order

2014-12-04 21:59:05 391

原创 poj 3628 Bookshelf 2(01背包,dfs)

DescriptionFarmer John recently bought another bookshelf for the cow library, but the shelf is getting filled up quite quickly, and now the only available space is at the top.FJ has N cows (1 ≤

2014-12-04 19:48:52 545

原创 hdu 2602 Bone Collector(01背包)

Problem DescriptionMany years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s , also he went to the grav

2014-12-04 16:51:30 356

原创 poj 3624 Charm Bracelet(01背包)

Charm BraceletTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 24394 Accepted: 11007DescriptionBessie has gone to the mall's jewelry store and spies a

2014-12-04 16:29:36 541

原创 根据二叉树的前序和中序求解树

求解方法类似于根据中序和后序求解树根据前序把中序分为左右子树,然后依次递归。前序:ABCDEFG中序:CBDEAFG#include #include #include using namespace std;typedef struct node{ char data; struct node *rchild,*lchild;}BiTNode,

2014-12-02 20:25:04 602

原创 根据二叉树的中序和后序求解树

参考:http://blog.csdn.net/wuchuanpingstone/article/details/6860453中序遍历:CBDEAFG后序遍历:CEDBGFA(1)先根据后序遍历结果找出树的根结点A。(2)然后将中序遍历分成三部分 CBDE    A    FG。(3)同样将后序结果分成 CEDB   GF   A三部分(根据左右子树结点个数相等分)。

2014-12-01 22:13:53 1258

UNIX环境高级编程第二版

UNIX环境高级编程第二版

2015-10-15

TCP-IP详解卷3:TCP事务协议,HTTP,NNTP和UNIX域协议

TCP-IP详解卷3:TCP事务协议,HTTP,NNTP和UNIX域协议

2015-10-15

TCP-IP详解卷1:协议

TCP-IP详解卷1:协议,网络协议通常分不同层次进行开发,每一层分别 负责不同的通信功能。一个协议族,比如 TCP/IP,是 一组不同层次上的多个协议的组合。 TCP/IP通常被认 为是一个四层协议系统

2015-10-15

nasm中文手册

NASM是一个为可移植性与模块化而设计的一个80x86的汇编器。它支持相当多的目标 文件格式,包括 Linux 和"NetBSD/FreeBSD","a.out","ELF","COFF",微软 16 位的"OBJ"和 "Win32"。它还可以输出纯二进制文件。它的语法设计得相当的简洁易懂,和 Intel 语法相似 但更简单。它支持"Pentium","P6","MMX","3DNow!","SSE" and "SSE2"指令集,

2015-03-12

线段树专辑

ACM大牛总结的线段树专辑_超经典的

2014-11-11

STL源码剖析简体中文完整版清晰

学习编程的人都知道,阅读、剖析名家代码乃是提高水平的捷径。源码之前,了无秘密。大师们的缜密思维、经验结晶、技术思路、独到风格,都原原本本体现在源码之中。在你仔细推敲之中,迷惑不解之时,恍然大悟之际,你的经验、思维、视野、知识乃至技术品位都会获得快速的成长。 本书所呈现的源码,使你踏上了基度山岛。源码之前了无秘密,你将看到vector的实现、list的实现、heap的实现、deque的实现、Red Black tree的实现、hash table的实现、set/map的实现;你将看到各种算法(排序、查找、排列组合、数据移动与复制技术)的实现;你甚至能够看到底层的memory pook和高阶抽象的traits机制的实现。

2014-11-11

C++标准程序库

C++中的标准程序库是类库和函数的集合,其使用核心语言写成。标准程序库提供若干泛型容器、函数对象、泛型字符串和流(包含交互和文件I/O),支持部分语言特性和常用的函数,如开平方根。C++标准程序库也吸收了ISO C90 C标准程序库。标准程序库的特性声明于std命名空间之中。 标准模板程序库是C++标准程序库的子集,包含容器、算法、迭代器、函数对象等。也有些人使用术语STL代表C++标准程序库。 使用C++标准程序库时,不必加上“.h”。

2014-11-10

ACM培训-动态规划

动态规划算法通常用来解决最优化问题。这些问 题可能存在多个解,每个解具有一个值。我们希 望找到一个具有最优(最大或最小)值的解。在 动态规划算法中,主要关心的是找到一个最优解 和求出最优解的值,而不是找出所有的最优解

2014-11-10

取石子游戏_博弈

一、游戏 游戏A: 1. 甲乙两人面对若干堆石子,其中每一堆石子的数目可以任意确定。例如图 1 所示的初始局面:共 n=3 堆,其中第一堆的石子数 a1=3,第二堆石子数 a2=3, 第三堆石子数 a3=1。两人轮流按下列规则取走一些石子,游戏的规则如下: 2. 每一步应取走至少一枚石子; 3. 每一步只能从某一堆中取走部分或全部石子; � 如果谁无法按规则取子,谁就是输家。 。。。。。。

2014-11-10

空空如也

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

TA关注的人

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