01 2018 档案
摘要: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...
阅读全文
摘要:C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二...
阅读全文
摘要:区间求和: tree[t]中储存的是[t,t-lowbit(t)+1]中每个数的和。#include #include #include #include using namespace std;#define MAXN 100int tree[MAXN];int N...
阅读全文