摘要:
Jumping CowsTime Limit:1000MS Memory Limit:32768KDescription:Farmer John's cows would like to jump over the moon, just like the cows in their favorite nursery rhyme. Unfortunately, cows can not jump. The local witch doctor has mixed up P (1 <= P <= 150,000) potions to aid the cows in their 阅读全文
摘要:
Jolly JumpersTime Limit:1000MS Memory Limit:1024KDescription:A sequence of n (n> 0) integers is called a jolly jumper if the absolute values of the difference between successive elements take on all the values 1 through n-1. For instance, 1 4 2 3 is a jolly jumper, because the absolutes differenc 阅读全文
摘要:
做幻方Time Limit:1000MS Memory Limit:1024KDescription:Apple最近迷上了做幻方,Apple还是个中高手,只要你说个奇数N,他就能把N*N的幻方做出来。其实你可以比他做得更好的。Apple总是画得很乱,而你可以利用程序排得很整齐^_^ 幻方的要求:每一行,每一列,还有两条斜线上数字的和都相等。Input:每行有一个数N(0< N < 30),输入0结束。Output:输入一个奇数,输出一个幻方,每个数占3格,顺序参照样板输出,输出完以后加一个回车。Sample Input:510Sample Output: 11 18 25 2 9 阅读全文
摘要:
AnimateTime Limit:1000MS Memory Limit:32768KDescription:Have you ever Googled the “Animate”?Tyr Googles the “Animate” one day, and find out 245 match records.But he doesn't know whether the number 245 is correct or not. Here comes the problem A: Give you documentation,your task is to find out wh 阅读全文