自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(38)
  • 资源 (9)
  • 收藏
  • 关注

原创 IT人士的网站

1、Chinaunix 网址:http://www.chinaunix.net/ 简介:中国最大的linux/unix技术社区。  2、ITPub 网址:http://www.itpub.net/ 简介:有名气的IT技术论坛,看看它的alexa排名就知道有多火了,尤其以数据库技术讨论热烈而闻名。ITPUB论坛的前身是建立在smiling的oracle小组。  3

2010-08-26 22:09:00 1235

原创 HDOJ_1238 Substrings 解题报告

Problem DescriptionYou are given a number of case-sensitive strings of alphabetic characters, find the largest string X, such that either X, or its inverse can be found as a substring of any of th

2010-08-26 22:06:00 1428

原创 HDOJ__1058 Humble Numbers 解题报告

Problem DescriptionA number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, ... shows the fir

2010-08-24 16:12:00 1134

原创 HDOJ_1709 The Balance 解题报告

Problem DescriptionNow you are asked to measure a dose of medicine with a balance and a number of weights. Certainly it is not always achievable. So you should find out the qualities which cannot

2010-08-24 10:23:00 1077

原创 HDPJ_1171 Big Event in HDU 解题报告

Problem DescriptionNowadays, we all know that Computer College is the biggest department in HDU. But, maybe you don't know that Computer College had ever been split into Computer College and Softw

2010-08-23 19:58:00 1890

原创 HDOJ_1389 Square Coins(母函数) 解题报告

Problem DescriptionPeople in Silverland use square coins. Not only they have square shapes but also their values are square numbers. Coins with values of all square numbers up to 289 (=17^2), i.e.

2010-08-23 19:53:00 909

转载 大学教程

计算机类 数据结构 (37课时) http://www.da-fan-shu.cn/20100415_952/汇编语言 (44课时)http://www.da-fan-shu.cn/20100415_948/计算机组成原理 (50课时)http://www.da-fan-shu.cn/20100327_905/ 计算机

2010-08-23 19:32:00 774

原创 Linux学习网站

 http://www.nixway.net/index.php?manpage

2010-08-23 19:30:00 519 2

原创 1421 搬寝室 动态规划(DP)

Problem Description搬寝室是很累的,xhd深有体会.时间追述2006年7月9号,那天xhd迫于无奈要从27号楼搬到3号楼,因为10号要封楼了.看着寝室里的n件物品,xhd开始发呆,因为n是一个小于2000的整数,实在是太多了,于是xhd决定随便搬2*k件过去就行了.但还是会很累,因为2*k也不小是一个不大于n的整数.幸运的是xhd根据多年的搬东西的经验发现每搬一次的疲劳度

2010-08-22 09:36:00 942

原创 HDOJ_1159 Common Subsequence 解题报告

Problem DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = another sequence Z = is a subsequence of X if there e

2010-08-21 19:53:00 885

原创 HDOJ_1160 FatMouse's Speed 解题报告

Problem DescriptionFatMouse believes that the fatter a mouse is, the faster it runs. To disprove this, you want to take the data on a collection of mice and put as large a subset of this data as p

2010-08-21 19:46:00 1070

原创 防卫导弹 解题报告

描述:一种新型的防卫导弹可截击多个攻击导弹。它可以向前飞行,也可以用很快的速度向下飞行,可以毫无损伤地截击进攻导弹,但不可以向后或向上飞行。但有一个缺点,尽管它发射时可以达到任意高度,但它只能截击比它上次截击导弹时所处高度低或者高度相同的导弹。现对这种新型防卫导弹进行测试,在每一次测试中,发射一系列的测试导弹(这些导弹发射的间隔时间固定,飞行速度相同),该防卫导弹所能获得的信息包括各进攻导

2010-08-21 19:38:00 1387

原创 迷宫问题 回溯法

描述:给一个20×20的迷宫、起点坐标和终点坐标,问从起点是否能到达终点。输入:多个测例。输入的第一行是一个整数n,表示测例的个数。接下来是n个测例,每个测例占21行,第一行四个整数x1,y1,x2,y2是起止点的位置(坐标从零开始),(x1,y1)是起点,(x2,y2)是终点。下面20行每行20个字符,’.’表示空格;’X’表示墙。输出:每个测例的输出占一

2010-08-21 08:17:00 1391

原创 HDOJ_2050 折线分割平面 解题报告

Problem Description我们看到过很多直线分割平面的题目,今天的这个题目稍微有些变化,我们要求的是n条折线分割平面的最大数目。比如,一条折线可以将平面分成两部分,两条折线最多可以将平面分成7部分,具体如下所示。  Input输入数据的第一行是一个整数C,表示测试实例的个数,然后是C 行数据,每行包含一个整数n(0   O

2010-08-19 20:08:00 1906

原创 HDOJ_1050 Moving Tables 解题报告

Problem DescriptionThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms each on the north sid

2010-08-19 15:47:00 1796 1

原创 hdu1425 sort 解题报告

Problem Description给你n个整数,请按从大到小的顺序输出其中前m大的数。  Input每组测试数据有两行,第一行有两个数n,m(0  Output对每组测试数据按从大到小的顺序输出前m大的数。  Sample Input5 3 3 -35 92 213 -644

2010-08-19 09:58:00 1372 3

原创 pku1160 Post Office 解题报告

思路:用opt[i][j]记录把前i个邮局建到前j个村庄中的最优解,用cost[i][j]记录所有在i到j村庄中,建1个邮局的最小代价。显然邮局应该设到中点。让前i个邮局覆盖前j个村庄,第i+1个邮局覆盖第j+1至j+k个村庄(j+k,则状态转移方程为opt[i+1][j+k]=min{opt[i][j]+cost[j+1][j+k];} (k+j代码如下:Code:

2010-08-18 10:53:00 590

原创 杭电oj 2047 阿牛的EOF牛肉串(递推方法)

Problem Description今年的ACM暑期集训队一共有18人,分为6支队伍。其中有一个叫做EOF的队伍,由04级的阿牛、XC以及05级的COY组成。在共同的集训生活中,大家建立了深厚的友谊,阿牛准备做点什么来纪念这段激情燃烧的岁月,想了一想,阿牛从家里拿来了一块上等的牛肉干,准备在上面刻下一个长度为n的只由"E" "O" "F"三种字符组成的字符串(可以只有其中一种或两种字符,

2010-08-18 00:21:00 1502

原创 贪心水题 pku2370 ** in danger

只是排序,然后就可以求解了。代码如下:Code:#include   #include   using namespace std;  const int Max(110);  int main ()  {       int data[Max];      int n;       cin>>n;       for(int i=1;i

2010-08-18 00:17:00 605

原创 1050pku To the Max 解题报告

DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located within the whole array. The sum of a rectangle

2010-08-17 17:43:00 702

原创 七种qsort排序方法

由于最近一直会涉及到排序的事,所以就把排序方法在这边总结一下在c++中qsort()排序函数的使用qsort函数应用大全 一、对int类型数组排序 int num[100];  Sample:  int cmp ( const void *a , const void *b )  {   return *(int *)a - *(int *)b;  }  

2010-08-16 21:15:00 573

原创 DNA Sorting poj1007 解题报告

DescriptionOne measure of ``unsortedness'' in a sequence is the number of pairs of entries that are out of order with respect to each other. For instance, in the letter sequence ``DAABEC'', this mea

2010-08-15 22:46:00 1520

原创 滑雪 poj1088 解题报告

DescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子  1 2 3 4 516 17 18 19 615 24 25 20 714 23

2010-08-15 21:23:00 1345

原创 Word Amalgamation(poj1318) 解题报告

DescriptionIn millions of newspapers across the United States there is a word game called Jumble. The object of this game is to solve a riddle, but in order to find the letters that appear in the an

2010-08-15 21:17:00 1110

原创 poj1328 Radar Installation 解题报告

DescriptionAssume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, loc

2010-08-15 21:11:00 2065

原创 Sum

描述:Consider the natural numbers from 1 to N. By associating to each number a sign (+ or -) and calculating the value of this expression we obtain a sum S. The problem is to determine for a given

2010-08-15 21:04:00 633

原创 poj1065 Wooden Sticks

DescriptionThere is a pile of n wooden sticks. The length and weight of each stick are known in advance. The sticks are to be processed by a woodworking machine in one by one fashion. It needs some

2010-08-14 22:03:00 831 1

原创 堡垒问题(贪心) 解题报告

描述: 城堡是一个4×4的方格,为了保卫城堡,现需要在某些格子里修建一些堡垒。城堡中的某些格子是墙,其余格子都是空格,堡垒只能建在空格里,每个堡垒都可以向上下左右四个方向射击,如果两个堡垒在同一行或同一列,且中间没有墙相隔,则两个堡垒都会把对方打掉。问对于给定的一种状态,最多能够修建几个堡垒。输入:每个测例以一个整数n(1输出:

2010-08-14 21:45:00 1373

原创 装载问题(西农Oj) 解题报告

描述:有两艘船,载重量分别是c1、 c2,n个集装箱,重量是wi (i=1…n),且所有集装箱的总重量不超过c1+c2。确定是否有可能将所有集装箱全部装入两艘船。输入:多个测例,每个测例的输入占两行。第一行一次是c1、c2和n(n输出:对于每个测例在单独的一行内输出Yes或No。输入样例:7 8 28 77 9 28 80 0

2010-08-13 23:33:00 2245

原创 Image Perimeters(POJ)解题报告

DescriptionTechnicians in a pathology lab analyze digitized images of slides. Objects on a slide are selected for analysis by a mouse click on the object. The perimeter of the boundary of an object

2010-08-13 21:11:00 862

原创 Max Sum(杭电OJ1003)解题报告

Max Sum Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence i

2010-08-13 21:01:00 5937 2

原创 悼念512汶川大地震遇难同胞——老人是真饿了(杭电OJ2187)解题报告

水提,不讲太多,就是最基础的贪心算法代码如下:Code:#include  #include  #include  using namespace std;  typedef struct Node  {       int p;      int h;   }data;   int Comp(const void *p1,const voi

2010-08-13 20:40:00 2054

原创 田忌赛马 解题报告

描述:田忌与齐王赛马,双方各有n匹马参赛(n),每场比赛赌注为1两黄金,现已知齐王与田忌的每匹马的速度,并且齐王肯定是按马的速度从快到慢出场,现要你写一个程序帮助田忌计算他最好的结果是赢多少两黄金(输用负数表示)。输入:多个测例。每个测例三行:第一行一个整数n,表示双方各有n匹马;第二行n个整数分别表示田忌的n匹马的速度;第三行n个整数分别表示齐王的n匹马的速度。n

2010-08-10 20:54:00 2644

原创 游戏字典序问题 解题报告

描述:在数据加密和数据压缩常需要对特殊的字串进行编码。给定的字母表A有26个英文字母组成A={a,b,…,z}。该字母表产生的升序字符串指的是字符串中字母按照从左到右出现的次序与字母在字母表中出现的次序相同,且每个字符最多出现1次。例如,a,b,ab,bc,xyz等字符串都是升序字符串。现在对字母表A产生的所有长度不超过6的升序字符串按照字典序列排列并编码如下。 对于任意长度不

2010-08-10 20:42:00 1017 2

原创 0-1背包问题(动态规划) 解题报告

利用动态规划,以自底向上的方式解各子问题。解题思路:此问题可转化为:给定c>0,wi>0,vi>0,1≤i≤n,要求找出一个n元0-1向量(x1,x2,…,xn),xi∈{0,1},1≤i≤n,使得∑wixi≤c,而且∑vixi达到最大。因此,0-1背包是一个特殊的整数规划问题:                     max ∑vixi

2010-08-09 21:11:00 1287

原创 poj1012 Joseph 解题报告

JosephDescriptionThe Joseph's problem is notoriously known. For those who are not familiar with the original problem: from among n people, numbered 1, 2, . . ., n, standing in circle every mth is

2010-08-08 17:51:00 1009

原创 找零钱 解题报告

Code:描述:      Poor Bessie has taken a job in the convenience store located just over the border in Slobbovia. Slobbovians use different coinages than the USA; their coin values change day-by-day

2010-08-06 18:37:00 1051

原创 算24点 解题报告

Code: /*********************利用回溯法**********************/      #include     #include                //字符串的头文件  #include     using namespace std;     const double PRECISION(1E-6);

2010-08-06 11:46:00 738

TinyXMLDemo

TinyXML是一个开源的解析XML的解析库,能够用于C++,能够在Windows或Linux中编译。这个解析库的模型通过解析XML文件,然后在内存中生成DOM模型,从而让我们很方便的遍历这棵XML树。DOM模型即文档对象模型,是将整个文档分成多个元素(如书、章、节、段等),并利用树型结构表示这些元素之间的顺序关系以及嵌套包含关系。

2013-09-03

wpf ListViewAndDataGird 数据绑定

wpf ListView DataGrid 数据 绑定,对做项目时候有很大帮助

2013-05-29

学习OpenCv(中文版)

学习OpenCV》:计算机视觉是在图像处理的基础上发展起来的新兴学科。OpenCV是一个开源的计算机视觉库,是英特尔公司资助的两大图像处理利器之一。它为图像处理、模式识别、三维重建、物体跟踪、机器学习和线性代数提供了各种各样的算法。

2013-03-08

文本编辑器Qt源码

一个不错的文本编辑器,对学习Qt基础 很有好处,可以学到其中的机制以及文件读取等等。

2012-01-19

快速排序的一个算法(一个例子)

这主要是一个快速排序的一个例子,可以更好的理解快速排序的本质

2010-08-19

poj题目类型总结(每题用到的算法)

这里面归类了很多题目用到的方法,可以对自己对算法更方面的训练的!

2010-08-18

HDU 2000-2099 解题报告

这个里面的代码写的很好,很规范,很用到很多库函数的,使得代码非常精炼的

2010-08-18

大一实习成果(通讯录系统)

这是一个C语言和数据结构的一个实习成果,主要是写程序时注意的一些方面

2010-08-17

空空如也

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

TA关注的人

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