摘要: Kindergarten Counting GameEverybody sit down in a circle. Ok. Listen to me carefully.``Woooooo, you scwewy wabbit!''Now, could someone tell me how many words I just said?Input and OutputInput to your program will consist of a series of lines, each line containing multiple words (at least one 阅读全文
posted @ 2014-01-15 14:26 dxywx 阅读(276) 评论(0) 推荐(0) 编辑
摘要: The DecoderWrite a complete program that will correctly decode a set of characters into a valid message. Your program should read a given file of a simple coded set of characters and print the exact message that the characters contain. The code key for this simple coding is a one for one character s 阅读全文
posted @ 2014-01-15 13:34 dxywx 阅读(224) 评论(0) 推荐(0) 编辑
摘要: Problem AEcological PremiumInput:standard inputOutput:standard outputTime Limit:1 secondMemory Limit:32 MBGerman farmers are given a premium depending on the conditions at their farmyard. Imagine the following simplified regulation: you know the size of each farmer's farmyard in square meters an 阅读全文
posted @ 2014-01-15 13:20 dxywx 阅读(214) 评论(0) 推荐(0) 编辑
摘要: Problem BBack to High School PhysicsInput:standard inputOutput:standard outputA particle has initial velocity and constant acceleration. If its velocity after certain time is v then what will its displacement be in twice of that time?InputThe input will contain two integers in each line. Each line m 阅读全文
posted @ 2014-01-15 12:49 dxywx 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 如何计算某一天是星期几?如何计算某一天是星期几? —— 蔡勒(Zeller)公式 历史上的某一天是星期几?未来的某一天是星期几?关于这个问题,有很多计算公式(两个通用计算公式和一些分段计算公式),其中最著名的是蔡勒(Zeller)公式。即w=y+[y/4]+[c/4]-2c+[26(m+1)/10]+d-1 公式中的符号含义如下,w:星期;c:世纪-1;y:年(两位数);m:月(m大于等于3,小于等于14,即在蔡勒公式中,某年的1、2月要看作上一年的13、14月来计算,比如2003年1月1日要看作2002年的13月1日来计算);d:日;[ ]代表取整,即只要整数部分。(C是世纪数减一,y是年份 阅读全文
posted @ 2013-10-11 08:41 dxywx 阅读(27529) 评论(0) 推荐(0) 编辑
摘要: 刚刚注册了博客,自己突然有些迷茫,自己要怎么走下去? 阅读全文
posted @ 2013-10-09 14:52 dxywx 阅读(131) 评论(0) 推荐(0) 编辑