2013年9月4日
摘要: F -Square Earth?Time Limit:2000MSMemory Limit:262144KB DescriptionMeg the Rabbit decided to do something nice, specifically — to determine the shortest distance between two points on the surface of our planet. But Meg... what can you say, she wants everything simple. So, she already regards our pla. 阅读全文
posted @ 2013-09-04 22:11 天梦Interact 阅读(299) 评论(0) 推荐(0) 编辑
摘要: DescriptionAccording to Berland laws it is only allowed to sell alcohol to peoplenot younger than18 years. Vasya's job is to monitor the law's enforcement. Tonight he entered a bar and sawnpeople sitting there. For every one of them Vasya happened to determine either the age or the drink the 阅读全文
posted @ 2013-09-04 22:02 天梦Interact 阅读(372) 评论(0) 推荐(0) 编辑
  2013年9月1日
摘要: 题目简介:—国际数学联盟确定的“2000—世界数学年”,又恰逢我国著名数学家华罗庚先生诞辰90周年。在华罗庚先生的家乡江苏金坛,组织了一场别开生面的数学智力竞赛活动,你的好朋友XZ也有幸得以参加。活动中,主持人给所有参加活动的选手出了这样一道题目:—设有一个长度为N(N≤40)的数字串,要求选手使用M(M≤6)个乘号将它分成M+1个部分,找出一种分法,使得这M+1个部分的乘积最大。—同时,为了帮助选手能够理解题意,主持人还举了如下一个例子:—有一个数字串:312,当N=3,M=1时会有两种分法:—⑴3×12=36—⑵31×2=62这时,符合题目要求的结果是:31× 阅读全文
posted @ 2013-09-01 10:49 天梦Interact 阅读(186) 评论(0) 推荐(0) 编辑
  2013年8月31日
摘要: Ecological Premium Input: standard input Output: standard output ... 阅读全文
posted @ 2013-08-31 10:11 天梦Interact 阅读(155) 评论(0) 推荐(0) 编辑
  2013年8月28日
摘要: B - Back to High School PhysicsTime Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmit StatusDescriptionA 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... 阅读全文
posted @ 2013-08-28 22:18 天梦Interact 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 今天因为一时没上去做题的网站,所以做了一点public比赛的题目,能上去时也没再去做,今天就先做点简单的吧。A - Hashmat the Brave WarriorTime Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmit StatusDescriptionHashmat is a brave warrior who with his group of young soldiers moves from one place to another to fight against his oppone... 阅读全文
posted @ 2013-08-28 22:16 天梦Interact 阅读(218) 评论(0) 推荐(0) 编辑
  2013年8月23日
摘要: 今天又看了一下以前做的小题目,感觉这个比较不错,虽然不是很难,但要注意的东西不少。总时间限制: 1000ms 内存限制: 65536kB描述两个十进制非负整数M和N,计算二者的差,既M-N。M、N最多可以是长度为200位的整数。输入多组数据,每组数据先是一行表示M,然后一行表示N。M和N开头均无冗余的0。输出每行一个数,表示M-N,开头不能有冗余的0,既不能输出05这样的数,而应该直接输出5。样例输入9999456701样例输出5432-1 源代码:#include#includeusing namespace std;int main(){ int i,k,m,n,x,p,m1,n1... 阅读全文
posted @ 2013-08-23 20:59 天梦Interact 阅读(252) 评论(0) 推荐(0) 编辑
  2013年8月18日
摘要: Problem Description平面上有n条直线,且无三线共点,问这些直线能有多少种不同交点数。比如,如果n=2,则可能的交点数量为0(平行)或者1(不平行)。 Input输入数据包含多个测试实例,每个测试实例占一行,每行包含一个正整数n(n 无交点;2、第四条与其中两条平行,交点数为(n-1)*1+0=3;3、第四条与其中一条平行,这两条平行直线和另外两点直线的交点数为(n-2)*2=4,而另外两条直线既可能平行也可能相交,因此可能交点数为: (n-2)*2+0=4 或者 (n-2)*2+1=54、第四条直线不与任何一条直线平行,交点数为: (n-3)*3+0=3 或者 (n-3)*3 阅读全文
posted @ 2013-08-18 15:41 天梦Interact 阅读(729) 评论(0) 推荐(0) 编辑
  2013年8月15日
摘要: Problem DescriptionLet S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two different ways: q By an integer sequence P = p1 p2...pn where pi is the number of left parentheses before the ith right parenthesis in S (P-sequence). q By an integer sequence W = w1 w2...wn where 阅读全文
posted @ 2013-08-15 17:16 天梦Interact 阅读(326) 评论(0) 推荐(0) 编辑
  2013年8月7日
摘要: 小孩报数问题总时间限制: 1000ms 内存限制: 65536kB描述有N个小孩围成一圈,给他们从1开始依次编号,现指定从第W个开始报数,报到第S个时,该小孩出列,然后从下一个小孩开始报数,仍是报到S个出列,如此重复下去,直到所有的小孩都出列(总人数不足S个时将循环报数),求小孩出列的顺序。输入第一行输入小孩的人数N(Nusing namespace std;struct lian{ int code;lian *next ; } ;lian * Create( int ) ;void Out(lian *,int,int,string name[]) ;int main(){ lian *. 阅读全文
posted @ 2013-08-07 09:10 天梦Interact 阅读(406) 评论(0) 推荐(0) 编辑