自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

GodLike

世界上最遥远的距离不是牛 A 和 牛 C 之间的狭小空隙而是我们当中有人在通往牛 B 的路上一路狂奔而有人中途就放弃了

  • 博客(18)
  • 资源 (8)
  • 收藏
  • 关注

原创 图论:回路判断和拓扑排序(DFS)

拓扑排序的定义是:将有向图中的顶点以线性方式进行排序。即对于任何连接自顶点u到顶点v的有向边uv,在最后的排序结果中,顶点u总是在顶点v的前面。适用范围:有向无环图(DAG),如果图中存在环路的话那么讨论就没有意义,当然在编程中需要对图是否有环进行判断。#include #include #include using namespace std;const int MAX = 5

2014-02-28 17:05:30 11352 3

原创 UVa 679 - Dropping Balls 数学分析

Dropping Balls A number of K balls are dropped one by one from the root of a fully binary tree structure FBT. Each time the ball being dropped first visits a non-terminal node. It then keeps moving do

2014-02-28 08:59:06 2010

原创 UVa 514 - Rails 注意最后的输出

Rails There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited that time. It

2014-02-27 13:20:15 1685

原创 UVa 10935 - Throwing cards away I STL

Problem B: Throwing cards away IGiven is an ordered deck of n cards numbered 1 to n with card 1 at the top and card n at the bottom. The following operation is performed as long as there are at

2014-02-27 12:28:04 1849

原创 UVa 10055 - Hashmat the Brave Warrior 注意格式

Problem AHashmat the brave warriorInput: standard inputOutput: standard output Hashmat is a brave warrior who with his group of young soldiers moves from one place to another to fight ag

2014-02-27 12:00:27 1638

原创 操作系统——信号量机制

信号量在长期的应用中得到发展,从整型信号量发展为记录型信号量,进而推广到AND 信号量。(1)整型信号量。 即一个整型值。int s;信号量上一共有两种操作:一种是P 操作,写为Wait(s) 或P(s); 另一种是 V 操作,写为Signal(s) 或 V(s). P(s): while s s := s-1;V(s): s:= s+1;(2) 利用信号量描述前趋

2014-02-24 23:32:24 4613

原创 2013年阿里算法笔试题解题报告

解答题:1、有一个算法,查找n个元素的的数组的最大值和最小值,要比较2n次;请写一个最高效的算法,并说明他要比较的次数。请注意复杂度的常数(不用写代码,说明步骤和过程即可,要定出比较的次数,没写不给分)2、有三个非递减序列的数组a[l]、b[m]、c[n],求他们之间的最小距离。已知距离的定义如下:distance = max(|a[i]-b[j]|, |a[i]-c[k]

2014-02-24 11:05:22 1775

原创 UVa 10881 - Piotr's Ants

Piotr's AntsTime Limit: 2 seconds"One thing is for certain: there is no stopping them;the ants will soon be here. And I, for one, welcome ournew insect overlords."Kent Brockman

2014-02-24 10:24:11 1080

原创 LA 3708- Graveyard

Programming contests became so popular in the year 2397 that the governor of New Earck -- the largest human-inhabited planet of the galaxy -- opened a special Alley of Contestant Memories (ACM) at the

2014-02-23 18:39:17 1021

原创 UVa 11300 Spreading the Wealth

注意:给定数轴上的n 个点,在数轴上的所有点中,中位数离所有顶点的距离之和最小。 F. Spreading the Wealth ProblemA Communist regime is trying to redistribute wealth in a village. They have have decided tosit eve

2014-02-23 13:58:16 1063

原创 UVa 11729 Commando War 贪心

GCommando WarInput: Standard InputOutput: Standard Output  “Waiting for orders we held in the wood, word from thefront never cameBy evening the sound of the gunfire was mil

2014-02-23 10:13:00 1006

原创 UVa 11292 The Dragon of Loowater 简单的比较题

Problem C: The Dragon of LoowaterOnce upon a time, in the Kingdom of Loowater, a minor nuisance turnedinto a major problem.The shores of Rellau Creek in central Loowater had always been a primebre

2014-02-23 08:57:20 1069

原创 poj 3280 Cheapest Palindrome DP

Cheapest PalindromeTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 5173 Accepted: 2512DescriptionKeeping track of all the cows can be a tricky task so F

2014-02-22 21:02:48 959

原创 poj 3616 Milking Time DP

Milking TimeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4129 Accepted: 1720DescriptionBessie is such a hard-working cow. In fact, she is so focuse

2014-02-21 19:32:13 1447

原创 poj 2229 Sumsets DP

SumsetsTime Limit: 2000MS Memory Limit: 200000KTotal Submissions: 11618 Accepted: 4677DescriptionFarmer John commanded his cows to search for different sets of nu

2014-02-20 13:22:39 1211

原创 poj 3262 贪心

Protecting the FlowersTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 3575 Accepted: 1465DescriptionFarmer John went to cut some wood and left N (2 ≤ N

2014-02-19 11:23:08 1927

原创 poj 1862 贪心

StripiesTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 11128 Accepted: 5327DescriptionOur chemical biologists have invented a new very useful form of lif

2014-02-19 10:21:36 1151

原创 poj 2393

Source CodeProblem: 2393 User: zoujinyongMemory: 252K Time: 94MSLanguage: C++ Result: AcceptedSource Code#include #include using namespace std;int main(){ int N, S; cin >> N >> S;

2014-02-18 19:25:53 1237

用JAVA语言处理AutoCAD图形数据的研究

用JAVA语言处理AutoCAD图形数据的研究

2013-12-24

java俄罗斯方块初级版

java俄罗斯方块初级版 多多交流,希望大家多多发现bug

2013-05-08

深入解析SQL Server 2008

深入解析SQL Server 2008 的第二部分

2013-04-19

深入解析SQL Server 2008.part1

深入解析SQL Server 2008 数据库中的巨作,你懂的! 这个文件要两个压缩文件

2013-04-19

数据库系统实现

里面描写的是数据库底层的操作和实现,对于想深入了解数据库的人来说,这本书会是一个很大的帮助!

2013-04-01

java api 中文版 chm 格式

java api 中文版 chm 格式 javase 的api 查询文档,.chm格式,使用与window 操作系统

2012-12-20

java 关键字查询文档

java 的关键字查询文档以网页的形式来模仿API力图实现方便,快捷,详细于一体!

2012-10-07

空空如也

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

TA关注的人

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