随笔分类 -  ACM-POJ

摘要:放苹果Time Limit : 2000/1000ms (Java/Other)Memory Limit : 20000/10000K (Java/Other)Total Submission(s) : 24Accepted Submission(s) : 17Problem Description把M个同样的苹果放在N个同样的盘子里,允许有的盘子空着不放,问共有多少种不同的分法?(用K表示)5,1,1和1,5,1 是同一种分法。Input第一行是测试数据的数目t(0 <= t <= 20)。以下每行均包含二个整数M和N,以空格分开。1<=M,N<=10。Output对 阅读全文
posted @ 2012-03-19 17:00 mtry 阅读(235) 评论(0) 推荐(0)
摘要:Phone ListTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 13154Accepted: 4207DescriptionGiven a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let's say the phone catalogue listed these numbers:Emergency 911Alice 97 625 999Bob 阅读全文
posted @ 2011-09-23 22:25 mtry 阅读(1215) 评论(0) 推荐(1)