自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 zoj 1655 Transport Goods(最短路径)

The HERO country is attacked by other country. The intruder is attacking the capital so other cities must send supports to the capital. There are some roads between the cities and the goods must be

2014-09-28 00:10:20 865

原创 二叉树的应用--哈夫曼树

哈夫曼树,最优二叉树。

2014-09-27 22:30:29 944

原创 zoj 2750 Idiomatic Phrases Game(最短路径)

Tom is playing a game called Idiomatic Phrases Game. An idiom consists of several Chinese characters and has a certain meaning. This game will give Tom two idioms. He should build a list of idioms a

2014-09-27 20:27:25 426

原创 zoj 1298 Domino Effect(最短路径)

Did you know that you can use domino bones for other things besides playing Dominoes? Take a number of dominoes and build a row by standing them on end with only a small distance in between. If you

2014-09-27 15:57:49 537

原创 poj 1456 Supermarket

DescriptionA supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured as an integral number of time units starting from t

2014-09-27 10:37:43 527

原创 zoj 3659 Conquer a New Region

The wheel of the history rolling forward, our king conquered a new region in a distant continent.There are N towns (numbered from 1 to N) in this region connected by several roads. It's confirmed th

2014-09-26 21:12:29 520

原创 hdu 3938 Portal

Problem DescriptionZLGG found a magic theory that the bigger banana the bigger banana peel .This important theory can help him make a portal in our universal. Unfortunately, making a pair of porta

2014-09-25 22:18:08 602

原创 hdu 4313 Matrix

Problem DescriptionMachines have once again attacked the kingdom of Xions. The kingdom of Xions has N cities and N-1 bidirectional roads. The road network is such that there is aunique path betw

2014-09-24 12:29:53 516

原创 hdu 2818 Building Block

Problem DescriptionJohn are playing with blocks. There are N blocks (1 M X Y : Put the whole pile containing block X up to the pile containing Y. If X and Y are in the same pile, just ignore t

2014-09-24 00:05:41 477

原创 hdu 1598 find the most comfortable road

Problem DescriptionXX星有许多城市,城市之间通过一种奇怪的高速公路SARS(Super Air Roam Structure---超级空中漫游结构)进行交流,每条SARS都对行驶在上面的Flycar限制了固定的Speed,同时XX星人对 Flycar的“舒适度”有特殊要求,即乘坐过程中最高速度与最低速度的差越小乘坐越舒服 ,(理解为SARS的限速要求,flycar必须瞬

2014-09-22 00:19:12 549

原创 hdu 2122 Ice_cream’s world III(最小生成树))

Problem Descriptionice_cream’s world becomes stronger and stronger; every road is built as undirected. The queen enjoys traveling around her world; the queen’s requirement is like II problem, beau

2014-09-21 21:49:19 501

原创 hdu 1874 畅通工程续(最短路径)

Problem Description某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人很困扰。现在,已知起点和终点,请你计算出要从起点到终点,最短需要行走多少距离。 Input本题目包含多组数据,请处理到文件结束。

2014-09-21 21:14:54 561

原创 zoj 2833 Friendship

Time Limit: 3 Seconds      Memory Limit: 32768 KBA friend is like a flower,a rose to be exact,Or maybe like a brand new gatethat never comes unlatched.A friend is like an owl,b

2014-09-21 11:54:31 795

原创 hdu 5014 Number Sequence

Problem DescriptionThere is a special number sequence which has n+1 integers. For each number in sequence, we have two rules:● ai ∈ [0,n] ● ai ≠ aj( i ≠ j )For sequence a and sequence b,

2014-09-20 20:48:31 474

原创 hdu 2544 最短路

Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗? Input输入包括多组数据。每组数据第一行是两个整数N、M(N输入保证至少存在1条商店到赛场的路线。

2014-09-20 00:48:14 601

原创 hdu 1596 find the safest road(最短路径)

Problem DescriptionXX星球有很多城市,每个城市之间有一条或多条飞行通道,但是并不是所有的路都是很安全的,每一条路有一个安全系数s,s是在 0 和 1 间的实数(包括0,1),一条从u 到 v 的通道P 的安全度为Safe(P) = s(e1)*s(e2)…*s(ek) e1,e2,ek是P 上的边 ,现在8600 想出去旅游,面对这这么多的路,他想找一条最安全的路。但是

2014-09-19 00:13:57 479

原创 zoj 1136 Multiple

a program that, given a natural number N between 0 and 4999 (inclusively), and M distinct decimal digits X1,X2..XM (at least one), finds the smallest strictly positive multiple of N that has no othe

2014-09-18 22:16:21 643

原创 zoj 1091 Knight Moves

A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n squares on a chessb

2014-09-18 20:42:28 593

原创 zoj 2048 Highways(最小生成树))

HighwaysTime Limit: 5 Seconds      Memory Limit: 32768 KB      Special JudgeThe island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has a very poor system of public highways.

2014-09-17 00:27:00 753

原创 hdu 1286 找新朋友

Problem Description新年快到了,“猪头帮协会”准备搞一个聚会,已经知道现有会员N人,把会员从1到N编号,其中会长的号码是N号,凡是和会长是老朋友的,那么该会员的号码肯定和N有大于1的公约数,否则都是新朋友,现在会长想知道究竟有几个新朋友?请你编程序帮会长计算出来。 Input第一行是测试数据的组数CN(Case number,1 

2014-09-16 21:25:10 467

原创 hdu 1285 确定比赛名次(拓扑排序)

Problem Description有N个比赛队(1 Input输入有若干组,每组中的第一行为二个数N(1 Output给出一个符合要求的排名。输出时队伍号之间有空格,最后一名后面没有空格。其他说明:符合条件的排名可能不是唯一的,此时要求输出时编号小的队伍在前;输入数据保证是正确的,即输入数据确保一定能有一个符合要求

2014-09-16 20:44:14 461

原创 hdu 5012 Dice

DiceTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 154    Accepted Submission(s): 89Problem DescriptionThere are 2 special dice

2014-09-14 20:22:04 553

原创 zoj 1914 Arctic Network(最小生成树))

The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used in establishing the network: every

2014-09-12 16:40:36 761

原创 zoj 2158 Truck History(最小生成树))

Advanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable delivery, other for furniture, or for bricks. The company has its own code describing each type of a

2014-09-12 15:20:20 495

原创 zoj 1586 QS Network(最小生成树))

In the planet w-503 of galaxy cgb, there is a kind of intelligent creature named QS. QScommunicate with each other via networks. If two QS want to get connected, they need to buy two network adapter

2014-09-12 11:48:18 631

原创 poj 2421 Constructing Roads(最小生成树))

DescriptionThere are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two village A and B are connected, i

2014-09-12 11:24:52 496

原创 zoj 1406 Jungle Roads(最小生成树))

Jungle RoadsTime Limit: 2 Seconds      Memory Limit: 65536 KBThe Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads betwe

2014-09-11 22:38:47 510

原创 zoj 1542 Network(最小生成树))

NetworkTime Limit: 2 Seconds      Memory Limit: 65536 KB      Special JudgeAndrew is working as system administrator and is planning to establish a new network in his company. There will be

2014-09-10 23:43:10 579

原创 zoj 1203 Swordfish(最小生成树))

SwordfishTime Limit: 2 Seconds      Memory Limit: 65536 KBThere exists a world within our worldA world beneath what we call cyberspace.A world protected by firewalls,passwords and the mo

2014-09-10 23:13:38 569

原创 zoj 1649 Rescue

RescueTime Limit: 2 Seconds      Memory Limit: 65536 KBAngel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M Angel's friends want to sa

2014-09-10 20:42:50 523

原创 hdu 1031 Design T-Shirt

Design T-ShirtTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5921    Accepted Submission(s): 2768Problem DescriptionSoon after

2014-09-09 22:25:56 506

原创 hdu 1022 Train Problem I

Train Problem ITime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 20991    Accepted Submission(s): 7933Problem DescriptionAs the ne

2014-09-08 23:53:50 429

原创 hdu 1015 Safecracker

SafecrackerTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8611    Accepted Submission(s): 4347Problem Description=== Op tech br

2014-09-08 13:56:20 459

原创 hdu 1010 Tempter of the Bone

Tempter of the BoneTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 71708    Accepted Submission(s): 19747Problem DescriptionThe

2014-09-07 20:09:12 435

原创 二叉搜索树

二叉搜索树(Binary Sort Tree)又称二叉查找树(Binary Search Tree),亦称二叉排序树。 它或者是一棵空树;或者是具有下列性质的二叉树: (1)若左子树不空,则左子树上所有结点的值均小于它的根结点的值; (2)若右子树不空,则右子树上所有结点的值均大于它的根结点的值; (3)左、右子树也分别为二叉排序树;二叉搜索树的结构:typ

2014-09-06 20:46:07 2489 1

原创 数据结构之堆排序

堆是具有下列性质的完全二叉树:每个结点的值都大于或等于其左右孩子结点的值,称为大顶堆(例如图9-7-2左图);或者每个结点的值都小于或等于其左右孩子结点的值,称为小顶堆(例如图9-7-2右图)。        这里需要注意从堆的定义可知,根结点一定是堆中所有结点最大(小)者。较大(小)的结点靠近根结点(但也不绝对,比如右图小顶堆中60、40均小于70,但它们并没有70靠近根结点)

2014-09-06 16:25:16 950

原创 hdu 1501 Zipper

ZipperTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6825    Accepted Submission(s): 2457Problem DescriptionGiven three strings

2014-09-05 20:19:20 477

原创 zoj 1088 System Overload

System OverloadTime Limit: 10 Seconds      Memory Limit: 32768 KBRecently you must have experienced that when too many people use the BBS simultaneously, the net becomes very, very slow.To

2014-09-03 00:08:46 629

原创 hdu 1159 Common Subsequence(最长公共子序列)

Common SubsequenceTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 23761    Accepted Submission(s): 10490Problem DescriptionA sub

2014-09-01 23:09:56 540

原创 poj 2533 Longest Ordered Subsequence(最长上升子序列)

Longest Ordered SubsequenceTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 33657 Accepted: 14730DescriptionA numeric sequence of ai is ordered if a1 a

2014-09-01 21:19:44 392

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关注的人

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