随笔分类 -  POJ

PKU ACM POJ
PKU 1003 Hangover
摘要:How far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're assuming that the cards must be perpendicular to the table.) With two cards you can make the top card overhang the bottom one by half a card length, and the bottom one overhang the table by a third of a card length, for a total maximum overhang of 1/2 + 1/3 = 5/6 card lengths. In general you can make n cards overhang by 1/2 + 1/3 + 1/4 + ... + 1/(n + 1) ca 阅读全文
posted @ 2010-04-06 19:13 步碎酒散花醉 阅读(448) 评论(0) 推荐(0)
PKU 1002 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 University of Waterloo by dialing the memorable TUT-GLOP. Sometimes only part of the number is used to spell a word. When you get back to your hotel tonight you can order a pizza from Gino's by dialing 310-GINO. Another way to make a telephone number memorable is to group the digits in a memorable way. You could order your 阅读全文
posted @ 2010-04-06 19:06 步碎酒散花醉 阅读(250) 评论(0) 推荐(0)
PKU 1001 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 experience for many computer systems. This problem requires that you write a program to compute the exact value of Rn where R is a real number ( 0.0 R 99.999 ) and n is an integer such that 0 n = 25. 阅读全文
posted @ 2010-04-06 18:46 步碎酒散花醉 阅读(441) 评论(0) 推荐(0)