算法竞赛-第五章
文章平均质量分 87
JeraKrs
本人目前就职于百度商业研发部,有需要内推的朋友简历可发我邮箱 jerakrs@qq.com
展开
-
uva 10061 How many zero's and how many digits ?(在bas进制下分解因子)
挺好的一道数论题。原创 2013-07-26 16:20:01 · 2927 阅读 · 2 评论 -
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,When a原创 2013-07-20 21:39:55 · 1300 阅读 · 0 评论 -
uva 400 Unix ls(借助printf("%*s",int, char*);控制格式)
Unix ls The computer company you work for is introducing a brand new computer line and is developing a new Unix-like operating system to be introduced along with the new computer. Your原创 2013-07-20 20:39:42 · 1346 阅读 · 0 评论 -
uva 156 Ananagrams(检索+sort排序)
Most crossword puzzle fans are used to anagrams--groups of words with the same letters in different orders--for example OPTS, SPOT, STOP, POTS and POST. Some words however do not have this attribute,原创 2013-07-28 15:43:49 · 1497 阅读 · 0 评论 -
uva 424 Integer Inquiry(高精度加法)
Integer Inquiry One 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 and he explored taking various sums of原创 2013-07-25 20:55:53 · 1199 阅读 · 0 评论 -
uva 10361 Automatic Poetry(字符串处理)
Automatic PoetryInput: standard inputOutput: standard outputTime Limit: 2 secondsMemory Limit: 32 MB “Oh God”, Lara Croft exclaims, “it’s one of these dumb riddles again!” In Tomb原创 2013-07-24 23:35:40 · 1111 阅读 · 0 评论 -
uva 10392 Factoring Large Numbers(分解因子)
Factoring Large NumbersOne of the central ideas behind much cryptography is that factoring large numbers is computationally intensive. In this context one might use a 100 digit number that was原创 2013-07-26 15:41:44 · 1266 阅读 · 0 评论 -
uva 550 Multiplying by Rotation(模拟)
Multiplying by Rotation Warning: Not all numbers in this problem are decimal numbers!Multiplication of natural numbers in general is a cumbersome operation. In some cases how原创 2013-07-26 15:08:16 · 1502 阅读 · 0 评论 -
uva 10110 Light, more light(因子的特性)
Light, more lightThe ProblemThere is man named "mabu" for switching on-off light in our University. He switches on-off the lights in a corridor. Every bulb has its own toggle switch.原创 2013-07-26 14:51:51 · 1042 阅读 · 0 评论 -
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 13:31:28 · 1321 阅读 · 0 评论 -
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 Scotland.原创 2013-07-31 11:21:55 · 1169 阅读 · 0 评论 -
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-31 11:08:12 · 1256 阅读 · 1 评论 -
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-31 10:09:42 · 972 阅读 · 0 评论 -
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-25 21:16:12 · 948 阅读 · 0 评论 -
uva 579 ClockHands(找规律)
ClockHands The medieval interest in mechanical contrivances is well illustrated by the development of the mechanical clock, the oldest of which is driven by weights and controlled by a原创 2013-07-20 13:41:02 · 1286 阅读 · 0 评论 -
uva 107 The Cat in the Hat(公式推导 + log函数的应用)
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-31 10:54:33 · 2374 阅读 · 8 评论 -
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-31 10:25:23 · 2550 阅读 · 0 评论 -
uva 120 Stacks of Flapjacks(检索)
Stacks of Flapjacks BackgroundStacks and Queues are often considered the bread and butter of data structures and find use in architecture, parsing, operating systems, and discr原创 2013-07-26 21:00:15 · 1408 阅读 · 0 评论 -
uva 748 Exponentiation(高精度实数乘法)
Exponentiation Problems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing experi原创 2013-07-20 21:34:47 · 1417 阅读 · 0 评论 -
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 13:19:25 · 1385 阅读 · 0 评论 -
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-31 10:20:43 · 1571 阅读 · 0 评论 -
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原创 2013-07-31 11:04:51 · 1590 阅读 · 0 评论 -
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-25 21:23:35 · 1660 阅读 · 0 评论 -
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 do原创 2013-07-31 11:18:36 · 1026 阅读 · 0 评论 -
uva 10719 Quotient Polynomial(多项式相除)
A polynomial of degree n can be expressed asIf k is any integer then we can write:Here q(x) is called the quotient polynomial of p(x) of degree (n-1) and r is any integer which is called t原创 2013-07-31 12:55:28 · 1466 阅读 · 0 评论 -
uva 10112 Myacm Triangles(收索+公式判断)
Myacm TrianglesSource file:triangle.{c, cpp, java, pas}Input file:triangle.inOutput file:triangle.outThere has been considerable archeological work on the原创 2013-07-25 21:50:34 · 1465 阅读 · 0 评论 -
uva 10387 Billiard(平面几何)
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 point from wh原创 2013-07-25 21:41:18 · 1454 阅读 · 0 评论 -
uva 10785 The Mad Numerologist(遍历+sort排序)
The Mad Numerologist Numerology is a science that is used by many people to find out a mans personality, sole purpose of life, desires to experience etc. Some calculations of numerology原创 2013-07-28 14:43:14 · 1095 阅读 · 0 评论 -
uva 755 487--3279(检索+排序)
487-3279 Businesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or phrase. For example, you can call the原创 2013-07-28 16:20:59 · 1061 阅读 · 0 评论 -
uva 152 Tree's a Crowd(检索)
Tree's a Crowd Dr William Larch, noted plant psychologist and inventor of the phrase ``Think like a tree--Think Fig'' has invented a new classification system for trees. This is a comp原创 2013-07-28 15:22:16 · 1283 阅读 · 0 评论 -
uva 10161 Ant on a Chessboard(蛇型矩阵)
Problem A.Ant on a Chessboard Background One day, an ant called Alice came to an M*M chessboard. She wanted to go around all the grids. So she began to walk along the chessboard ac原创 2013-07-20 13:47:37 · 1185 阅读 · 0 评论 -
uva 113 Power of Cryptography(double活用)
Power of Cryptography BackgroundCurrent work in cryptography involves (among other things) large prime numbers and computing powers of numbers modulo functions of these primes. W原创 2013-07-31 09:58:10 · 1131 阅读 · 0 评论 -
uva 123 Searching Quickly(遍历+排序)
Searching Quickly BackgroundSearching and sorting are part of the theory and practice of computer science. For example, binary search provides a good example of an easy-to-unde原创 2013-07-28 15:57:13 · 1579 阅读 · 0 评论 -
uva 299 Train Swapping(模拟冒泡排序)
At an old railway station, you may still encounter one of the last remaining ``train swappers''. A train swapper is an employee of the railroad, whose sole job it is to rearrange the carriages of trai原创 2013-07-28 15:36:43 · 1566 阅读 · 0 评论 -
uva 10815 Andy's First Dictionary(字符串处理+sort排序)
Problem B: Andy's First DictionaryTime limit: 3 secondsAndy, 8, has a dream - he wants to produce his very own dictionary. This is not an easy task for him, as the number of原创 2013-07-25 00:09:10 · 2078 阅读 · 0 评论 -
uva 408 Uniform Generator
数论题目很有趣原创 2013-07-26 19:28:19 · 1772 阅读 · 0 评论 -
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 13:03:33 · 1518 阅读 · 0 评论 -
uva 10194 Football (aka Soccer)(字符串处理+sort排序)
Football (aka Soccer) The ProblemFootball the most popular sport in the world (americans insist to call it "Soccer", but we will call it "Football"). As everyone knows, Brasil原创 2013-07-28 16:16:43 · 2236 阅读 · 0 评论 -
uva 10474 Where is the Marble?(计数排序)
Where is the Marble? Raju and Meena love to play with Marbles. They have got a lot of marbles with numbers written on them. At the beginning, Raju would place the marbles one after ano原创 2013-07-20 00:33:17 · 1279 阅读 · 0 评论 -
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-25 21:09:07 · 1355 阅读 · 0 评论