自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

写东西的地方

on the way

  • 博客(21)
  • 收藏
  • 关注

原创 uva-657 - The die is cast

#include #include using namespace std; char g[50][50]; int w, h; int dir[4][2] = { {-1,0},{0,1},{1,0},{0,-1}}; void count( int x, int y) // 点数的深搜,查找X连通块。连通的X算同一点。 { g[x][y] = '*'; //将X换

2014-08-27 16:55:45 485

原创 uva-572 - Oil Deposits

Oil Deposits  The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creat

2014-08-27 15:09:04 479

原创 uva-10562 Undraw the Trees

Problem D Undraw the Trees  Input: Standard Input Output: Standard Output Time Limit: 2 Seconds   Professor Homer has been reported missing. We suspect that his recent research works might have

2014-08-24 18:02:00 476

转载 从Trie树(字典树)谈到后缀树(10.28修订)(转载)

从Trie树(字典树)谈到后缀树 作者:July、yansha。 出处:http://blog.csdn.net/v_JULY_v 。  引言     常关注本blog的读者朋友想必看过此篇文章:从B树、B+树、B*树谈到R 树,这次,咱们来讲另外两种树:Tire树与后缀树。不过,在此之前,先来看两个问题。     第一个问题: 一个文本文件,大约有一万行,每

2014-08-23 22:32:58 729

原创 297 - Quadtrees

Quadtrees  A quadtree is a representation format used to encode images. The fundamental idea behind the quadtree is that any image can be split into four quadrants. Each quadrant may again

2014-08-23 21:17:35 439

原创 uva_ 548-Tree

Tree  You are to determine the value of the leaf node in a given binary tree that is the terminal node of a path of least value from the root of the binary tree to any leaf. The value of a

2014-08-22 15:01:23 464

原创 uva_112 - Tree Summing (树的求和)

Tree Summing  Background LISP was one of the earliest high-level programming languages and, with FORTRAN, is one of the oldest languages currently being used. Lists, which are the fu

2014-08-22 09:59:04 690

原创 uva_101 - The Blocks Problem

The Blocks Problem  Background  Many areas of Computer Science use simple, abstract domains for both analytical and empirical studies. For example, an early AI study of planning and robo

2014-08-20 18:29:32 474

原创 hihocoder-第七周-完全背包

时间限制:20000ms 单点时限:1000ms 内存限制:256MB 描述 且说之前的故事里,小Hi和小Ho费劲心思终于拿到了茫茫多的奖券!而现在,终于到了小Ho领取奖励的时刻了! 等等,这段故事为何似曾相识?这就要从平行宇宙理论说起了………总而言之,在另一个宇宙中,小Ho面临的问题发生了细微的变化! 小Ho现在手上有M张奖券,而奖品区有N种奖品,分别标号为1

2014-08-18 22:57:02 586

原创 hihocoder_ 第六周 - 01背包

时间限制:20000ms 单点时限:1000ms 内存限制:256MB 描述 且说上一周的故事里,小Hi和小Ho费劲心思终于拿到了茫茫多的奖券!而现在,终于到了小Ho领取奖励的时刻了! 小Ho现在手上有M张奖券,而奖品区有N件奖品,分别标号为1到N,其中第i件奖品需要need(i)张奖券进行兑换,同时也只能兑换一次,为了使得辛苦得到的奖券不白白浪费,小Ho给每件奖

2014-08-18 22:26:44 672

原创 平衡二叉树

template class AvlTree {     struct Node;     typedef Node * Position;     public:         AvlTree() { root_ = NULL;}         void insert( const T &x) { insert( x, root_);}         void remov

2014-08-18 09:38:22 491

原创 poj_ 1190 生日蛋糕

描述 7月17日是Mr.W的生日,ACM-THU为此要制作一个体积为Nπ的M层生日蛋糕,每层都是一个圆柱体。 设从下往上数第i(1 Ri+1且Hi > Hi+1。 由于要在蛋糕上抹奶油,为尽可能节约经费,我们希望蛋糕外表面(最下一层的下底面除外)的面积Q最小。 令Q = Sπ 请编程对给出的N和M,找出蛋糕的制作方案(适当的Ri和Hi的值),使S最小。 (除Q外,以上所有数据皆为正整

2014-08-17 22:14:02 5489

原创 uva_10061 - How many zero's and how many digits ?

Problem G How many zeros and how many digits? Input: standard input Output: standard output Given a decimal integer number you will have to find out how many trailing zeros will be there in its

2014-08-16 15:40:59 714

原创 uva_127 - "Accordian" Patience

``Accordian'' Patience  You are to simulate the playing of games of ``Accordian'' patience, the rules for which are as follows: Deal cards one by one in a row from left to right, not ove

2014-08-16 15:26:04 544

原创 uva_375 - Inscribed Circles and Isosceles Triangles

#include #include #include using namespace std; double circum ( double b, double h) { double theta = atan(2*h/b); //腰与高的夹角 double r = b/2*tan(theta/2); if ( r < 0.000001) retu

2014-08-14 18:29:13 517

原创 uva_10250 - The Other Two Trees

Problem E The Other Two Trees Input: standard input Output: standard output Time Limit: 2 seconds   You have a quadrilateral shaped land whose opposite fences are of equal length. You have four

2014-08-14 16:38:32 428

原创 uva_408 - Uniform Generator

Computer simulations often require random numbers. One way to generate pseudo-random numbers is via a function of the form where ``  " is the modulus operator. Such a function will generate ps

2014-08-14 13:17:21 430

原创 uva_ 575-Skew Binary

When a number is expressed in decimal, the k-th digit represents a multiple of 10k. (Digits are numbered from right to left, where the least significant digit is number 0.) For example,  Wh

2014-08-14 11:37:54 392

原创 uva_10719 - Quotient Polynomial

Problem B Quotient Polynomial Time Limit 2 Seconds A polynomial of degree n can be expressed as If k is any integer then we can write: Here q(x) is called the quotien

2014-08-14 10:57:24 468

原创 uva_10025 - The ? 1 ? 2 ? ... ? n = k problem

The ? 1 ? 2 ? ... ? n = k problem  The problem Given the following formula, one can set operators '+' or '-' instead of each '?', in order to obtain a given k ? 1 ? 2 ? ... ? n = k For

2014-08-14 00:08:09 594

原创 uva_253 - Cube painting

Cube painting  We have a machine for painting cubes. It is supplied with three different colors: blue, red and green. Each face of the cube gets one of these colors. The cube's faces are numb

2014-08-13 14:18:27 546

空空如也

空空如也

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

TA关注的人

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