摘要:
Vasya likes everything infinite. Now he is studying the properties of a sequence s, such that its first element is equal to a (s1 = a), and the differ 阅读全文
摘要:
#include //******************************* //打表卡特兰数 //第 n个 卡特兰数存在a[n]中,a[n][0]表示长度; //注意数是倒着存的,个位是 a[n][1] 输出时注意倒过来。 //********************************* int a[105][100]; void ktl() { int i,j,yu... 阅读全文
摘要:
Problem Description The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbe 阅读全文
摘要:
Problem Description 呃......变形课上Harry碰到了一点小麻烦,因为他并不像Hermione那样能够记住所有的咒语而随意的将一个棒球变成刺猬什么的,但是他发现了变形咒语的一个统一规律:如果咒语是以a开头b结尾的一个单词,那么它的作用就恰好是使A物体变成B物体. Harry已 阅读全文
摘要:
A wise man told Kerem "Different is good" once, so Kerem wants all things in his life to be different. Kerem recently got a string s consisting of low 阅读全文
摘要:
Every year, hundreds of people come to summer camps, they learn new algorithms and solve hard problems. This is your first year at summer camp, and yo 阅读全文
摘要:
有一群人,打乒乓球比赛,两两捉对撕杀,每两个人之间最多打一场比赛。球赛的规则如下:如果A打败了B,B又打败了C,而A与C之间没有进行过比赛,那么就认定,A一定能打败C。如果A打败了B,B又打败了C,而且,C又打败了A,那么A、B、C三者都不可能成为冠军。根据这个规则,无需循环较量,或许就能确定冠军。 阅读全文
摘要:
#include <stdio.h>int f(int n)//判断是否是回文数,是返回1,否则返回0{ int t=0,m=n; while(m)//如果m不等于0,执行下面循环,否则跳出循环 (求这个数各位上数字反向排列的数 ) { t*=10; t+=m%10; m/=10; } return 阅读全文
摘要:
N皇后问题 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 16803 Accepted Submission(s): 7631 Problem 阅读全文
摘要:
Problem Description The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large re 阅读全文