随笔分类 - Algorithm
摘要:Problem F: Factoring Large NumbersOne of the central ideas behind much cryptography is that factoring large numbers is computationally intensive. In t...
阅读全文
摘要:Pseudo-Random NumbersComputers normally cannot generate really random numbers, but frequently are used to generate sequences of pseudo-random numbers....
阅读全文
摘要:Uniform GeneratorComputer simulations often require random numbers. One way to generate pseudo-random numbers is via a function of the formwhere ``" i...
阅读全文
摘要:Just the FactsThe expressionN!, read as ``Nfactorial," denotes the product of the firstNpositive integers, whereNis nonnegative. So, for example,NN!01...
阅读全文
摘要:Multiplying by RotationWarning: Not all numbers in this problem are decimal numbers!Multiplication of natural numbers in general is a cumbersome opera...
阅读全文
摘要: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...
阅读全文
摘要:Skew BinaryWhen a number is expressed in decimal, thek-th digit represents a multiple of 10k. (Digits are numbered from right to left, where the least...
阅读全文
摘要:Simple calculationsThe ProblemThere is a sequence of n+2 elements a0, a1,…, an+1(n #includeint main(){ int T, n, i; double first, final, sum, te...
阅读全文
摘要:Big ChocolateMohammad has recently visited Switzerland. As he loves his friends very much, he decided to buy some chocolate for them, but as this fine...
阅读全文
摘要: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, continu...
阅读全文
摘要:Problem J(2/3/4)-D Sqr/Rects/Cubes/Boxes?Input: standard inputOutput: standard outputTime Limit: 2 secondsYou can see a (4x4) grid below. Can you tell...
阅读全文
摘要:Problem BQuotient PolynomialTime Limit2 SecondsA polynomial of degree n can be expressed asIf k is any integer then we can write:Here q(x) is called t...
阅读全文
摘要:Searching for Nessy The Loch Ness Monsteris a mysterious and unidentified animal said to inhabit Loch Ness, a large deep freshwater loch near the ci...
阅读全文
摘要: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 eve...
阅读全文
摘要:Problem HThe Land of JusticeInput: standard input Output: standard output Time Limit: 4 secondsIn the Land of Justice the selling price of everything ...
阅读全文
摘要: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, orby o...
阅读全文
摘要: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 f...
阅读全文
摘要:Box of BricksLittle Bob likes playing with his box of bricks. He puts the bricks one upon another and builds stacks of different height. ``Look, I've ...
阅读全文
摘要:Secret ResearchAt a certain laboratory results of secret research are thoroughly encrypted. A result of a single experiment is stored as an informatio...
阅读全文
摘要:Cube paintingWe 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 ...
阅读全文


浙公网安备 33010602011771号