自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

丙三醇

Stupid boy learn programming . QQ交流:792883735

  • 博客(12)
  • 资源 (2)
  • 收藏
  • 关注

原创 归并排序

按照分治三步法,对归并排序算法介绍如下: (1)划分问题:把序列分成元素个数尽量相等的两半; (2)递归问题:把两半元素分别排序; (3)合并问题:把两个有序表合并成一个。 前两部分很容易完成的,关键在于如何把两个有序表合并成一个。图8-2演示了一个合并的过程。每次只需要把两个序列的最小元素加以比较,删除其中的较小元素并加入合并后的新表即可。由于需要一个新表来存放结果,所以附加空间n。

2013-10-26 11:17:11 998

原创 HDU1003——Max Sum(DP)

Problem Description Given 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 is 6 + (-1) + 5

2013-10-25 20:40:22 902

原创 HDU1016-Prime Ring Problem(DFS)

Problem Description A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime

2013-10-23 11:29:42 873

原创 HDU2553-N皇后问题(DFS)

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

2013-10-22 20:46:21 925

原创 UVA11300——Spreading the Wealth (贪心+建模)

Problem A Communist regime is trying to redistribute wealth in a village. They have have decided to sit everyone around a circular table. First, everyone has converted all of their properties to coin

2013-10-21 18:52:48 1227

原创 容器(JFrame)

//实例1:直接定义Jframe 类的对象创建一个窗口 package jFrame; import javax.swing.*; //使用Swing类,必须引入Swing包 public class JFrameDemo1 { public static void main(String args[]) { // 定义一个窗体对象f,窗体名称为"一个简单窗口" JFrame f =

2013-10-17 11:54:00 1613

原创 UVA11729 - Commando War

There is a war and it doesn't look very promising for your country. Now it's time to act. You have a commando squad at your disposal and planning an ambush on an important enemy camp located nearby. Y

2013-10-17 00:23:56 1442

原创 UVA11292-Dragon of Loowater

Once upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem. The shores of Rellau Creek in central Loowater had always been a prime breeding ground for geese. Due to th

2013-10-16 11:03:47 837

原创 POJ2503——Babelfish

Description You have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help you understand them.

2013-10-15 20:29:27 1003

原创 sscanf用法小结

sscanf与scanf类似,都是用于输入的,只是后者以键盘(stdin)为输入源,前者以固定字符串为输入源。 第一个参数可以是一个或多个 {%[*] [width] [{h | I | I64 | L}]type | ' ' | '\t' | '\n' | 非%符号} 注: 1、 * 亦可用于格式中, (即 %*d 和 %*s) 加了星号 (*) 表示跳过此数据不读入. (也就

2013-10-15 19:21:08 1043 1

原创 UVA10361 - Automatic Poetry

“Oh God”, Lara Croft exclaims, “it’s one of these dumb riddles again!”   In Tomb Raider XIV, Lara is, as ever, gunning her way through ancient Egyptian pyramids, prehistoric caves and medival hallwa

2013-10-13 16:20:53 1019

原创 UVA10010- Where's Waldorf?(string+暴搜)

Where's Waldorf?  Given a m by n grid of letters, ( ), and a list of words, find the location in the grid at which the word can be found. A word matches a straight, uninterrupted line of

2013-10-12 23:57:48 1019

百度文库下载器(给力版)

百度文库下载器(给力版)

2013-03-30

dos高手速成

dos高手速成

2013-01-22

空空如也

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

TA关注的人

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