自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(34)
  • 收藏
  • 关注

转载 Android之shader渲染(线性渐变、镜像渐变、角度渐变)

在android平台中提供了两种重载方式来实例化该类分别为,他们的不同之处为参数中第一种方法参数仅为起初颜色color0和最终颜色color1;而第二种方法可以用颜色数组,和位置来实现更细腻的过渡效果,比如颜色采样int[] colors数组中存放20种颜色,则渐变将会逐一处理。LinearGradient(float x0, float y0, float x1, float y1, i

2013-09-10 16:31:22 3012

转载 PKU-1051 P,MTHBGWB (map的使用)

原题链接 http://poj.org/problem?id=1051P,MTHBGWBTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 6854 Accepted: 3942DescriptionMorse code represents ch

2013-07-01 20:42:50 405

转载 PKU=1062 昂贵的聘礼 (Dijkstra)

原题链接 http://poj.org/problem?id=1062 昂贵的聘礼Description年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水

2013-05-26 23:42:13 351

转载 PKU-1273 Drainage Ditches (网络最大流)

原题链接 http://poj.org/problem?id=1273Drainage DitchesDescriptionEvery time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is cover

2013-05-21 10:31:17 391

转载 PKU-2243 Knight Moves (单BFS、双BFS)

原题链接 http://poj.org/problem?id=2243Knight MovesDescriptionA friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves

2013-05-18 13:44:35 392

转载 PKU-1077 Eight (八数码之IDA*)

原题链接:http://poj.org/problem?id=1077EightDescriptionThe 15-puzzle has been around for over 100 years; even if you don't know it by that name, you've seen it.  It is constructed with 15 sliding

2013-05-18 12:49:50 580

转载 PKU-1077 Eight (八数码之A*算法)

原题链接 http://poj.org/problem?id=1077EightDescriptionThe 15-puzzle has been around for over 100 years; even if you don't know it by that name, you've seen it.  It is constructed with 15 sliding

2013-05-18 12:49:19 519

转载 PKU-1077 Eight (八数码之双向BFS)

原题链接 http://poj.org/problem?id=1077EightDescriptionThe 15-puzzle has been around for over 100 years; even if you don't know it by that name, you've seen it.  It is constructed with 15 sliding

2013-05-17 13:04:50 459

转载 PKU-1077 Eight (八数码单向BFS+HASH)

原题链接 http://poj.org/problem?id=1077  EightDescriptionThe 15-puzzle has been around for over 100 years; even if you don't know it by that name, you've seen it.  It is constructed with 15 slidin

2013-05-15 17:36:08 506

转载 RMQ问题

参考链接 http://kmplayer.iteye.com/blog/575725               http://blog.163.com/zhaohai_1988/blog/static/209510085201263011135062/ RMQ (Range Minimum/Maximum Query)问题是指:对于长度为n的数列A,回答若干询问RMQ(A,i,j)(

2013-05-13 17:30:54 340

转载 PKU-3264 Balanced Lineup (RMD之ST算法)

原题链接 http://poj.org/problem?id=3264Balanced LineupDescriptionFor the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to org

2013-05-13 17:08:20 383

转载 PKU-3264 Balanced Lineup (RMQ之线段树)

原题链接 http://poj.org/problem?id=3264Balanced LineupDescriptionFor the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to org

2013-05-13 15:17:46 328

转载 PKU-1458 Common Subsequence (最长公共子序列LCS)

原题链接 http://poj.org/problem?id=1458Common SubsequenceDescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = anoth

2013-05-13 11:41:18 337

转载 HDU-1010 Tempter of the Bone (DFS)

原题链接 http://acm.hdu.edu.cn/showproblem.php?pid=1010Tempter of the BoneProblem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up,

2013-05-13 00:32:27 304

转载 PKU-1067 取石子游戏 (威佐夫博奕(Wythoff Game))

原题链接 http://poj.org/problem?id=1067 取石子游戏Description有两堆石子,数量任意,可以不同。游戏开始由两个人轮流取石子。游戏规定,每次有两种不同的取法,一是可以在任意的一堆中取走任意多的石子;二是可以在两堆中同时取走相同数量的石子。最后把石子全部取完者为胜者。现在给出初始的两堆石子的数目,如果轮到你先取,假设双方都采取最好的策略,问最

2013-05-12 17:09:05 514

转载 博弈---取石子游戏

取石子问题 有一种很有意思的游戏,就是有物体若干堆,可以是火柴棍或是围棋子等等均可。两个人轮流从堆中取物体若干,规定最后取光物体者取胜。这是我国民间很古老的一个游戏,别看这游戏极其简单,却蕴含着深刻的数学原理。下面我们来分析一下要如何才能够取胜。(一)巴什博奕(Bash Game):只有一堆n个物品,两个人轮流从这堆物品中取物,规定每次至少取一个,最多取m个。最后取光者得胜。

2013-05-12 17:01:07 275

转载 PKU-1014 Dividing (多重背包)

原题链接 http://poj.org/problem?id=1014DividingDescriptionMarsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the

2013-05-12 15:05:00 302

转载 PKU-1503 Integer Inquiry(模拟大数相加)

原题地址 http://poj.org/problem?id=1503Integer InquiryDescriptionOne of the first users of BIT's new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go from 0 to 333 a

2013-05-11 20:10:53 297

转载 PKU-1664 放苹果

原题链接 http://poj.org/problem?id=1664放苹果Description把M个同样的苹果放在N个同样的盘子里,允许有的盘子空着不放,问共有多少种不同的分法?(用K表示)5,1,1和1,5,1 是同一种分法。Input第一行是测试数据的数目t(0 Output对输入的每组数据M和N,用一行输出相应的K。Sample Input17

2013-05-09 15:34:13 360

转载 PKU-1061 青蛙的约会 (扩展的欧几里德算法)

原题链接  http://poj.org/problem?id=1061青蛙的约会Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方

2013-05-09 10:39:26 529

转载 动态规划和记忆化搜索

原文链接 http://blog.csdn.net/urecvbnkuhbh_54245df/article/details/5847876动态规划和记忆化搜索:动态规划:就是一个最优化问题,先将问题分解为子问题,并且对于这些分解的子问题自身就是最优的才能在这个基础上得出我们要解决的问题的最优方案,要不然的话就能找到一个更优的解来替代这个解,得出新的最优自问题,这当然是和前提是矛盾的。

2013-05-07 00:08:30 629

转载 PKU-1088 滑雪(记忆化搜索)

原题链接 http://poj.org/problem?id=1088滑雪DescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3

2013-05-06 23:59:24 313

转载 PKU-1050 To the Max (最大子矩阵和)

原题链接 http://poj.org/problem?id=1050To the MaxDescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater loca

2013-05-05 21:40:20 267

转载 HDU-1003 Max Sum(最大连续子段和)

原题链接 http://acm.hdu.edu.cn/showproblem.php?pid=1003Max SumProblem 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, giv

2013-05-05 20:55:37 295

转载 最小生成树(Prim和Kruskal)

原文链接 http://blog.csdn.net/pbj1203/article/details/6213954最小生成树给定一个带权的无向连通图,如何选取一棵生成树,使树上所有边上权的总和为最小,这叫最小生成树.求最小生成树的算法(1) 克鲁斯卡尔算法图的存贮结构采用边集数组,且权值相等的边在数组中排列次序可以是任意的.该方法对于边相对比较多的不是很实用,浪费时间.(2

2013-05-03 22:33:22 426

转载 (最小生成树-Prim)PKU-1258 Agri-Net

原题链接 http://poj.org/problem?id=1258Agri-NetDescriptionFarmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area.

2013-05-03 22:18:28 292

转载 (最短路-floyd+邻接矩阵)PKU-1125 Stockbroker Grapevine

原题链接  http://poj.org/problem?id=1125Stockbroker GrapevineDescriptionStockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amo

2013-05-03 14:19:28 370

转载 最短路径算法

原文链接 http://dongzi85.blog.163.com/blog/static/8079890520089288468222/最短路径算法分类:无回路网络:拓扑排序法无负权网络:Dijkstra算法,Bellman-Ford算法带负权网络:Bellman-Ford算法所有点对之间的最短路径:Floyd-Warshall算法在图中存在负权的情况下,最短路径不一

2013-05-03 11:26:15 610

转载 PKU-1001 Exponentiation(浮点数相乘)

原题链接 http://poj.org/problem?id=1001ExponentiationDescriptionProblems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of

2013-05-03 10:51:11 338

转载 PKU-1012 Joseph (约瑟夫环)

原题链接 http://poj.org/problem?id=1012JosephDescriptionThe Joseph's problem is notoriously known. For those who are not familiar with the original problem: from among n people, numbered 1, 2, . .

2013-05-03 10:46:47 398

转载 PKU-1011 Sticks (DFS + 剪枝)

原题链接 http://poj.org/problem?id=1011SticksDescriptionGeorge took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to t

2013-05-03 10:42:18 324

转载 PKU-1163 The Triangle

原题链接 http://poj.org/problem?id=1163The TriangleDescription73 88 1 02 7 4 44 5 2 6 5(Figure 1)Figure 1 shows a number triangle. Write a program that calculates

2013-05-03 10:33:38 292

转载 PKU-1159 Palindrome (最长公共子序列LCS)

原题链接 http://poj.org/problem?id=1159PalindromeDescriptionA palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left.  You are to w

2013-05-03 10:27:35 266

转载 PKU-1080 Human Gene Functions

原题链接 http://poj.org/problem?id=1080Human Gene Functions DescriptionIt is well known that a human gene can be considered as a sequence, consisting of four nucleotides, which are simply denote

2013-05-03 10:13:12 303

空空如也

空空如也

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

TA关注的人

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