摘要:
AtCoDeer is thinking of painting an infinite two-dimensional grid in a checked pattern of side K. Here, a checked pattern of side K is... 阅读全文
摘要:
#define MAXN 1000005char s[MAXN];//原字符串char New[2*MAXN];//处理过后得到的新字符串int p[2*MAXN];//记录以每个字符为中心的最长回文长度+1,注意是+1后的结果//这里为什么多出1一定要想明白,很重要... 阅读全文
摘要:
Andy the smart computer science student was attending an algorithms class when the professor asked the students a simple question, "Ca... 阅读全文
摘要:
The little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their n... 阅读全文
摘要:
For each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to kno... 阅读全文
摘要:
CC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there are o... 阅读全文
摘要:
Problem DescriptionRecall the definition of the Fibonacci numbers: f1 := 1 f2 := 2 fn := fn-1 + fn-2 (n >= 3)Given two numbers a and b... 阅读全文
摘要:
给出N个整数,你来判断一下是否能够选出4个数,他们的和为0,可以则输出"Yes",否则输出"No"。 Input第1行,1个数N,N为数组的长度(4 #include #include #include using namespace std;int board[1... 阅读全文
摘要:
#include #include #include #include using namespace std;#define MAXN 100int board[MAXN];int result[MAXN];void Merge(int left,int mid,i... 阅读全文
摘要:
In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swap... 阅读全文