自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Remilia's

此博客停更了,新博客地址www.zhuoyifan.net

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

原创 UVA 1344 Tian Ji -- The Horse Racing

Tian Ji -- The Horse RacingHere is a famous story in Chinese history.That was about 2300 years ago. General Tian Ji was a high official in the country Qi. He likes to play horse racing wit

2013-07-31 23:06:58 1549

原创 UVA 305 Joseph (约瑟夫环 打表)

Joseph The 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

2013-07-31 22:24:07 1224

原创 UVA 1368 DNA Consensus String

Figure 1.DNA (Deoxyribonucleic Acid) is the molecule which contains the genetic instructions. It consists of four different nucleotides, namely Adenine, Thymine, Guanine, and Cytosine as shown in Fi

2013-07-31 22:06:42 877

原创 HDU 4508 湫湫系列故事――减肥记I

对于吃货来说,过年最幸福的事就是吃了,没有之一!  但是对于女生来说,卡路里(热量)是天敌啊!  资深美女湫湫深谙“胖来如山倒,胖去如抽丝”的道理,所以她希望你能帮忙制定一个食谱,能使她吃得开心的同时,不会制造太多的天敌。  当然,为了方便你制作食谱,湫湫给了你每日食物清单,上面描述了当天她想吃的每种食物能带给她的幸福程度,以及会增加的卡路里量。 Input

2013-07-31 22:02:58 1382

原创 HDU 4510 小Q系列故事――为什么时光不能倒流

我以为我会是最坚强的那一个 我还是高估了自己  我以为你会是最无情的那一个 还是我贬低了自己  就算不能够在一起 我还是为你担心  就算你可能听不清 也代表我的心意  那北极星的眼泪 闪过你曾经的眼角迷离  那玫瑰花的葬礼 埋葬的却是关于你的回忆  如果时光可以倒流 我希望不要和你分离  如果注定分离 我希望不要和你相遇    ――摘自《小Q失恋日记

2013-07-31 21:56:50 1134

原创 HDU 4500 小Q系列故事――�丝的逆袭

毕业于普通本科的小Q一直自称是资深�丝,不仅学校不知名,甚至他自己在这个普通学校也是默默无闻――直到临近毕业的时候,班里5朵金花中的2位甚至从没和他说过话!  谁又能想到,如此不起眼的小Q在历经重重面试环节后,竟然如愿以偿加入了心仪已久的腾讯公司!消息刚刚传开的那几天,这在他们班甚至整个学院都是讨论的热门话题,如果这时候你还表示不知道小Q是谁,你都会被大家当作怪物的。  正所谓野百合也有春

2013-07-31 21:53:08 1900

原创 UVA 141 The Spot Game 斑点游戏。。

The Spot Game The game of Spot is played on an NxN board as shown below for N = 4. During the game, alternate players may either place a black counter (spot) in an empty square or remo

2013-07-31 10:25:05 1613

原创 UVA 10591 Happy Number

Problem CHappy NumberTime Limit1 Second Let the sum of the square of the digits of a positive integer S0 be represented by S1. In a similar way, let the sum of the sq

2013-07-31 10:17:06 1032

原创 UVA 10887 Concatenation of Languages

Concatenation of LanguagesInput File: Standard InputOutput: Standard Output A language is a set of strings. And the concatenation of two languages is the set of all strings that are formed by

2013-07-31 10:11:39 1214

原创 UVA 10125 Sumsets 技巧性的枚举

Problem C - SumsetsGiven S, a set of integers, find the largest d such that a + b + c = d where a, b, c, and d are distinct elements of S.InputSeveral S, each consisting of a line containing a

2013-07-31 10:08:58 2546

原创 UVA 10391 Compound Words

Problem E: Compound WordsYou are to find all the two-word compound words in a dictionary. A two-word compound word is a word in the dictionary that is the concatenation of exactly two other wo

2013-07-31 10:00:18 1158

原创 UVA 10282 Babelfish

Problem C: BabelfishYou 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 underst

2013-07-31 09:54:56 1905

原创 UVA 188 Perfect Hash

Perfect Hash Perfect Software, Inc. has obtained a government contract to examine text flowing through a high-speed network for the occurrence of certain words. Your boss, Wally Perfec

2013-07-31 09:51:14 960

原创 UVA 10112 Myacm Triangles

Problem B: Myacm TrianglesSource file:triangle.{c, cpp, java, pas}Input file:triangle.inOutput file:triangle.outThere has been considerable archeological

2013-07-31 01:03:31 896

原创 uva-10387 - Billiard

Problem A: BilliardIn a billiard table with horizontal side a inches and vertical side b inches, a ball is launched from the middle of the table. After s > 0 seconds the ball returns to the po

2013-07-31 01:00:18 866

原创 UVA 375 Inscribed Circles and Isosceles Triangles

Inscribed Circles and Isosceles Triangles Given two real numbersBthe width of the base of an isosceles triangle in inchesHthe altitude of the same isosceles triangle in inches

2013-07-31 00:55:25 2040

原创 UVA 10250 The Other Two Trees

The Other Two TreesInput: standard inputOutput: standard outputTime Limit: 2 seconds You have a quadrilateral shaped land whose opposite fences are of equal length. You have four neighbors w

2013-07-31 00:52:20 715

原创 UVA 10562 Undraw the Trees

Undraw the Trees Input: Standard InputOutput: Standard OutputTime Limit: 2 Seconds Professor Homer has been reported missing. We suspect that his recent research works might have had somethi

2013-07-31 00:42:02 662

原创 UVA 839 Not so Mobile

Not so Mobile Before being an ubiquous communications gadget, a mobile was just a structure made of strings and wires suspending colourfull things. This kind of mobile is usually found

2013-07-31 00:37:38 737

原创 UVA 712 S-Trees

S-Trees A Strange Tree (S-tree) over the variable set  is a binary tree representing a Boolean function. Each path of the S-tree begins at the root node and consists of n+1 nodes. Ea

2013-07-31 00:32:57 681

原创 UVA 10014 Simple calculations

Simple calculations The ProblemThere is a sequence of n+2 elements a0, a1,…, an+1 (n i 1000). It is known that ai = (ai–1 + ai+1)/2 – ci   for each i=1, 2, ..., n. You are given a0,

2013-07-31 00:27:32 2390

原创 UVA 10970 Big Chocolate

Mohammad has recently visited Switzerland. As he loves his friends very much, he decided to buy some chocolate for them, but as this fine chocolate is very expensive(You know Mohammad is a little BIT

2013-07-31 00:17:38 1033

原创 UVA 10916 Factstone Benchmark

Problem B: Factstone BenchmarkAmtel has announced that it will release a 128-bit computer chip by 2010, a 256-bit computer by 2020, and so on, continuing its strategy of doubling the word-size eve

2013-07-31 00:11:32 786

原创 UVA 10177 (2/3/4)-D Sqr/Rects/Cubes/Boxes

(2/3/4)-D Sqr/Rects/Cubes/Boxes?Input: standard inputOutput: standard outputTime Limit: 2 seconds You can see a (4x4) grid below. Can you tell me how many squares and rectangles are hidden t

2013-07-31 00:05:50 876

原创 UVA 10719 Quotient Polynomial

Quotient PolynomialTime Limit2 SecondsA polynomial of degree n can be expressed asIf k is any integer then we can write:Here q(x) is called the quotient

2013-07-31 00:01:36 1173

原创 UVA 11044 Searching for Nessy

Searching for Nessy The Loch Ness Monsteris a mysterious and unidentified animal said to inhabit Loch Ness,  a large deep freshwater loch near the city of Inverness in northern Scotl

2013-07-30 23:57:49 1004

原创 UVA 10790 How Many Points of Intersection?

How Many Points of Intersection? We have two rows. There are a dots on the top row and b dots on the bottom row. We draw line segments connecting every dot on the top row with every dot

2013-07-30 23:55:15 2864 1

原创 UVA 10499 The Land of Justice

The Land of JusticeInput: standard inputOutput: standard outputTime Limit: 4 secondsIn the Land of Justice the selling price of everything is fixed all over the country. Nobody can buy a t

2013-07-30 23:47:20 836

原创 UVA 846 Steps

Steps One steps through integer points of the straight line. The length of a step must be nonnegative and can be by one bigger than, equal to, or by one smaller than the length of the pr

2013-07-30 23:43:42 1784

原创 UVA 573 The Snail

The Snail A snail is at the bottom of a 6-foot well and wants to climb to the top. The snail can climb 3 feet while the sun is up, but slides down 1 foot at night while sleeping. The s

2013-07-30 23:33:07 744

原创 UVA 107 The Cat in the Hat

The Cat in the Hat Background(An homage to Theodore Seuss Geisel)The Cat in the Hat is a nasty creature,But the striped hat he is wearing has a rather nifty feature.W

2013-07-30 23:29:29 1131

原创 UVA 591 Box of Bricks

Box of Bricks Little Bob likes playing with his box of bricks. He puts the bricks one upon another and builds stacks of different height. ``Look, I've built a wall!'', he tells his old

2013-07-30 23:20:25 979

原创 UVA 10025 The ? 1 ? 2 ? ... ? n = k problem

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

2013-07-30 23:17:40 1134

原创 UVA 621 Secret Research

Secret Research At a certain laboratory results of secret research are thoroughly encrypted. A result of a single experiment is stored as an information of its completion:`po

2013-07-30 23:08:47 729

原创 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 ar

2013-07-30 23:06:07 1448 5

原创 UVA 113 Power of Cryptography

Power of Cryptography BackgroundCurrent work in cryptography involves (among other things) large prime numbers and computing powers of numbers modulo functions of these primes.

2013-07-30 23:01:16 689

原创 UVA 112 Tree Summing

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

2013-07-29 10:08:12 854

原创 UVA 10494 If We Were a Child Again 高精度除以低精度。。

If We Were a Child AgainInput: standard inputOutput: standard outputTime Limit: 7 seconds “Oooooooooooooooh!If I could do the easy mathematics like my school days!!I can guarante

2013-07-28 22:04:06 752

原创 UVA 465 Overflow 高精度加法乘法(误!。其实应该说是浮点数的优势。。。)

Overflow Write a program that reads an expression consisting of two non-negative integer and an operator. Determine if either integer or the result of the expression is too large to be

2013-07-28 21:58:49 985

原创 UVA 10106 Product 高精度乘法

Product The ProblemThe problem is to multiply two integers X, Y. (0250)The InputThe input will consist of a set of pairs of lines. Each line in pair contains one multip

2013-07-28 21:53:27 726

空空如也

空空如也

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

TA关注的人

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