随笔分类 - 简单数学
摘要:THE DRUNK JAILERTime Limit:1000MSMemory Limit:10000KTotal Submissions:21957Accepted:13879DescriptionA certain prison contains a long hall of n cells, each right next to each other. Each cell has a prisoner in it, and each cell is locked.One night, the jailer gets bored and decides to play a game. Fo
阅读全文
摘要:Problem EThe Other Two TreesInput:standard inputOutput:standard outputTime Limit:2 secondsYou have a quadrilateral shaped land whose opposite fences are of equal length. You have four neighbors whose lands are exactly adjacent to your four fences, thatmeansyou have a common fence with all of them. F
阅读全文
摘要:Problem BCode RefactoringTime Limit: 2 seconds"Harry, my dream is a code waiting to bebroken. Break the code, solve the crime."Agent CooperSeveral algorithms in modern cryptography are based on the fact that factoring large numbers is difficult. Alicia and Bobby know this, so they have dec
阅读全文
摘要:Problem F: 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 a product of two 50 digit prime numbers. Even with the fastest projected computers this factoriz
阅读全文
摘要: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 significant digit is number 0.) For example,When a number is expressed in binary, thek-th digit represents a multiple of 2k. For example,Inskew binar
阅读全文
摘要:Big ChocolateMohammad has recently visitedSwitzerland. 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 stingy!), he could only afford buying one chocolate, albeit a very big one (part of it c
阅读全文
摘要:The ? 1 ? 2 ? ... ? n = k problemThe problemGiven the following formula, one can set operators '+' or '-' instead of each '?', in order to obtain a given k? 1 ? 2 ? ... ? n = kFor example: to obtaink = 12, the expression to be used will be:- 1 + 2 + 3 + 4 + 5 + 6 - 7 = 12with
阅读全文
摘要:The Cat in the HatBackground(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.With one flick of his wrist he pops his top off.Do you know what's inside that Cat's hat?A bunch of small cats, each with its ow
阅读全文
摘要: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 built a wall!'', he tells his older sister Alice. ``Nah, you should make all stacks the same height. Then you would have a real wall.'
阅读全文
摘要: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 these colors. The cube's faces are numbered as in Figure 1.Figure 1.Since a cube has 6 faces, our machine can paint a face-numbered cube indiffere
阅读全文
摘要:Problem A.Ant on a ChessboardBackgroundOne 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 according to this way: (you can assume that her speed is one grid per second)At the first second, Alice was standing at (1,1
阅读全文

浙公网安备 33010602011771号