ACM
mashang163
电子科大中山学院
展开
-
pku_1250_Tanning Salon
pku_1250_Tanning Salon DescriptionTan Your Hide, Inc., owns several coin-operated tanning salons. Research has shown that if a customer arrives and there are no beds available, the customer will原创 2008-11-12 12:21:00 · 186 阅读 · 0 评论 -
pku_1565_Skew Binary
pku_1565_Skew Binary DescriptionWhen a number is expressed in decimal, the kth digit represents a multiple of 10k. (Digits are numbered from right to left, where the least significant digit is n原创 2008-11-13 13:20:00 · 217 阅读 · 0 评论 -
pku_2017_Speed Limit
pku_2017_Speed Limit DescriptionBill and Ted are taking a road trip. But the odometer in their car is broken, so they dont know how many miles they have driven. Fortunately, Bill has a working原创 2008-11-13 13:25:00 · 293 阅读 · 0 评论 -
pku_2027_No Brainer
pku_2027_No Brainer DescriptionZombies love to eat brains. Yum. InputThe first line contains a single integer n indicating the number of data sets. The following n lines each represent a原创 2008-11-13 13:29:00 · 457 阅读 · 0 评论 -
pku_2039_To and Fro
pku_2039_To and Fro DescriptionMo and Larry have devised a way of encrypting messages. They first decide secretly on the number of columns and write the message (letters only) down the columns,原创 2008-11-13 13:31:00 · 361 阅读 · 0 评论 -
pku_2578_Keep on Truckin'
pku_2578_Keep on Truckin DescriptionBoudreaux and Thibodeaux are on the road again . . . "Boudreaux, we have to get this shipment of mudbugs to Baton Rouge by tonight!" "Dont worry, Thibod原创 2008-11-13 13:44:00 · 271 阅读 · 0 评论 -
pku_3062_Celebrity jeopardy
pku_3062_Celebrity jeopardy DescriptionIts hard to construct a problem thats so easy that everyone will get it, yet still difficult enough to be worthy of some respect. Usually, we err on one原创 2008-11-13 13:48:00 · 242 阅读 · 0 评论 -
pku_2105_IP Address
pku_2105_IP Address DescriptionSuppose you are reading byte streams from any device, representing IP addresses. Your task is to convert a 32 characters long sequence of 1s and 0s (bits) to a原创 2008-11-13 13:41:00 · 194 阅读 · 0 评论 -
pku_1008_玛雅历
pku_1008_玛雅历 Description上周末,M.A. Ya教授对古老的玛雅有了一个重大发现。从一个古老的节绳(玛雅人用于记事的工具)中,教授发现玛雅人使用了一个一年有365天的叫做Haab的历法。这个Haab历法拥有19个月,在开始的18个月,一个月有20天,月份的名字分别是pop, no, zip, zotz, tzec, xul, yoxkin, mol, chen,原创 2008-11-13 20:26:00 · 1081 阅读 · 0 评论 -
hdu_1312_Red and Black
hdu_1312_Red and Black Problem DescriptionThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can原创 2008-11-24 22:49:00 · 370 阅读 · 0 评论 -
pku_1658_Eva's Problem
pku_1658_Evas Problem DescriptionEva的家庭作业里有很多数列填空练习。填空练习的要求是:已知数列的前四项,填出第五项。因为已经知道这些数列只可能是等差或等比数列,她决定写一个程序来完成这些练习。 Input第一行是数列的数目t(0 Output对输入的每个数列,输出它的前五项。 Sample Input21原创 2008-11-12 23:08:00 · 211 阅读 · 0 评论 -
pku_2000_Gold Coins
pku_2000_Gold Coins DescriptionThe king pays his loyal knight in gold coins. On the first day of his service, the knight receives one gold coin. On each of the next two days (the second and thir原创 2008-11-12 21:15:00 · 666 阅读 · 0 评论 -
pku_1519_Digital Roots
pku_1519_Digital Roots DescriptionThe digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital ro原创 2008-11-12 19:51:00 · 228 阅读 · 0 评论 -
pku_1003_Hangover
pku_1003_Hangover DescriptionHow 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. (Were assuming that the c原创 2008-11-09 21:39:00 · 221 阅读 · 0 评论 -
pku_1005_I Think I Need a Houseboat
pku_1005_I Think I Need a Houseboat DescriptionFred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land, he learned that the s原创 2008-11-09 22:47:00 · 265 阅读 · 0 评论 -
pku_1006_生理周期
pku_1006_生理周期 Description人生来就有三个生理周期,分别为体力、感情和智力周期,它们的周期长度为23天、28天和33天。每一个周期中有一天是高峰。在高峰这天,人会在相应的方面表现出色。例如,智力周期的高峰,人会思维敏捷,精力容易高度集中。因为三个周期的周长不同,所以通常三个周期的高峰不会落在同一天。对于每个人,我们想知道何时三个高峰落在同一天。对于每个周期,我们会原创 2008-11-09 22:57:00 · 399 阅读 · 1 评论 -
pku_1007_DNA Sorting
pku_1007_DNA Sorting DescriptionOne measure of ``unsortedness in a sequence is the number of pairs of entries that are out of order with respect to each other. For instance, in the letter sequ原创 2008-11-10 16:28:00 · 311 阅读 · 0 评论 -
pku_2136_Vertical Histogram
pku_2136_Vertical Histogram DescriptionWrite a program to read four lines of upper case (i.e., all CAPITAL LETTERS) text input (no more than 72 characters per line) from the input file and print原创 2008-11-11 14:35:00 · 232 阅读 · 0 评论 -
pku_1000_A+B Problem
pku_1000_A+B Problem DescriptionCalculate a + b InputTwo integer a,,b (0 ≤ a,b ≤ 10) OutputOutput a + b Sample Input1 2 Sample Output3#include int main(){ int a原创 2008-11-09 20:58:00 · 165 阅读 · 0 评论 -
pku_1004_Financial Management
pku_1004_Financial Management DescriptionLarry graduated this year and finally has a job. Hes making a lot of money, but somehow never seems to have enough. Larry has decided that he needs to g原创 2008-11-09 22:23:00 · 115 阅读 · 0 评论 -
北大OJ的结构体
北大的OJ对于结构体的支持好像不完美,用结构体定义变量时只能用这种方式struct Q{ char string[51]; int num;}list[101],p; //定义在此处 而不能用这种struct Q{ char string[51]; int num;};int main(){原创 2008-11-10 16:55:00 · 219 阅读 · 0 评论 -
pku_1298_The Hardest Problem Ever
pku_1298_The Hardest Problem Ever DescriptionJulius Caesar lived in a time of danger and intrigue. The hardest situation Caesar ever faced was keeping himself alive. In order for him to survive,原创 2008-11-12 19:05:00 · 316 阅读 · 0 评论 -
博弈(入门)个人心得
博弈(入门)个人心得马尚 2009年3月5日关键词:必败态,异或 我们先看下这张图┏→ 一定 →┓必败态 胜态┗← 可能 ←┛以下象棋为例,说明上面图示所表示的含义。假如你和一个人在对弈并处于这样一种局面:你已经将了对方的军,轮到对手走棋,对手无论如何都无法补救。这种局面就是必败态, 对应上面的图来看,就是对于对手来说的“必败态”,无论他怎样走都“必定”原创 2009-03-05 23:20:00 · 369 阅读 · 0 评论