摘要:One hundred layerTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1257Accepted Submission(s): 467Problem DescriptionNow there is a game called the new man down 100th floor. The rules of this game is: 1.At first you are at the 1st floor. And the flo.
阅读全文
摘要:The More The BetterTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2568Accepted Submission(s): 668Problem DescriptionGiven an sequence of numbers {X1, X2, ... , Xn}, where Xk= (A * k + B) % mod. Your task is to find the maximum sub sequence {Y1, Y2
阅读全文
摘要:Remmarguts' DateTime Limit:4000MSMemory Limit:65536KTotal Submissions:17853Accepted:4879Description"Good man never makes girls wait or breaks an appointment!" said the mandarin duck father. Softly touching his little ducks' head, he told them a story."Prince Remmarguts lives i
阅读全文
摘要:DequeTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 786Accepted Submission(s): 253Problem DescriptionToday, the teacher gave Alice extra homework for the girl weren't attentive in his class. It's hard, and Alice is going to turn to you for
阅读全文
摘要:Dragon BallTime Limit: 3000/1500 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1680Accepted Submission(s): 614Problem DescriptionSean has got a Treasure map which shows when and where the dragon balls will appear. some dragon balls will appear in a line at the same ti
阅读全文
摘要:As long as Binbin loves SangsangTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2053Accepted Submission(s): 501Problem DescriptionBinbin misses Sangsang so much. He wants to meet with Sangsang as soon as possible.Now Binbin downloads a map from ELG
阅读全文
摘要:I-numberTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 195Accepted Submission(s): 75Problem DescriptionThe I-number of x is defined to be an integer y, which satisfied the the conditions below:1.y>x;2.the sum of each digit of y(under base 10)
阅读全文
摘要:Park VisitTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 85Accepted Submission(s): 34Problem DescriptionClaire and her little friend, ykwd, are travelling in Shevchenko's Park! The park is beautiful - but large, indeed. N feature spots in the
阅读全文
摘要:------------LISNumberDivTwo最小的连续递增子序列的个数。。。----从前往后扫描一遍即可。。#include #include #include #include using namespace std; class LISNumberDivTwo{ private: public: int calculate(vector seq) { int ans=0; int n=seq.size(); for (int i=0;i0)f[0]=...
阅读全文
摘要:---------------A. CakeminatorrXc的蛋糕中有一些邪恶的草莓,如果某一行或某一列没有草莓我们可以吃掉这一排。问最多能吃多少蛋糕。----直接暴力寻找空行空列即可。#include #include using namespace std; const int maxn=21; char s[maxn][maxn];
bool v[maxn][maxn];
int r,c; int main()
{ memset(v,0,sizeof(v)); cin>>r>>c; for (int i=1;i>(s[i]+1); for ...
阅读全文
摘要:----------------------------A. Even Odds将1到n中的奇数排到前面偶数排到后面,问第k个数是多少。----嗯。。。math#include #include #include using namespace std; typedef long long LL; LL n,d,k,m; int main()
{ cin>>n>>k; m=(n+1)/2; if (k
#include #include #include #include using namespace std;
typedef long long...
阅读全文
摘要:----------------A. Magic Numbers一个神奇的数字是由1、14、144连接而成的,判断一个数字是不是神奇数字。----①没有连续3个以上的4。②首位不能为4。数据范围太大,最好按字符读入。#include #include #include using namespace std; char c;
int n,num;
bool flag; int main()
{ flag=true; num=0; n=0; while (cin>>c) { if (n==0&&c!='1') {
...
阅读全文
摘要:-----------------250SwappingDigits给一个数字串,要求交换两个数字的位置得到一个尽可能小的数字。(可以不交换)----从高位向低位枚举,对每一位,从低位向高位找一个比它小的数,若能找到则交换即答案。对首位不能为0进行特殊处理。#include #include #include using namespace std; class SwappingDigits{ private: public: string minNumber(string num) { int n=num.le...
阅读全文
摘要:------------250TopFox给两个字符串,求有多少种不同的前缀和。----直接枚举前缀,压入set即可。#include #include #include #include #include #include #include using namespace std; class TopFox{ public: int possibleHandles(string a,string b) { int ans; setst; for (int i=0;i...
阅读全文
摘要:------------A. Flipping Game有n个整数a1, a2, ..., an,每个整数只可能为0或1。选择一个区间[i, j](i
#include #include #include using namespace std;
const int INF=1e9;
int a[111]={0};
int f[111]={0};
int n; int main()
{ int ans; int bas; while (cin>>n) { ans=-INF; bas=0; for (int...
阅读全文
摘要:E. Ciel the Commandertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output现在Fox Ciel成为了Tree Land的指挥官。Tree Land,正如它的名字所说,有n个城市由n-1条无向道路连接,并且其中任意两个城市之间总是存在一条路径。Fox Ciel需要在每个城市分配一个官员。每个官员都有一个等级---一个’A’到’Z’之间的字母。所以会有26个不同的等级,’A’是最高的,’Z’是最低的。每个等级都有足够的官员。但是必
阅读全文
摘要:-----------------A. Ciel and Dancingn个男孩和m个女孩配对跳舞,每首歌有一对男女跳舞,要求配对男孩和女孩中至少有一个没有跳过舞。求最多的能放的歌曲数并输出配对方案。分析可知最多能放n+m-1首歌曲。----贪心,男孩1和所有的女孩跳舞。女孩1和所有的男孩跳舞。除去男孩1和女孩1重复的情况#include #include #include using namespace std; int main()
{ int n,m; int s; while (cin>>n>>m) { s=0; ...
阅读全文
摘要:Intersecting LinesTime Limit:1000MSMemory Limit:10000KTotal Submissions:8222Accepted:3746DescriptionWe all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three ways: 1) no intersection because they are parallel, 2) intersect
阅读全文
摘要:Scrambled PolygonTime Limit:1000MSMemory Limit:30000KTotal Submissions:5868Accepted:2777DescriptionA closed polygon is a figure bounded by a finite number of line segments. The intersections of the bounding line segments are called the vertices of the polygon. When one starts at any vertex of a clos
阅读全文
摘要:WallTime Limit:1000MSMemory Limit:10000KTotal Submissions:25770Accepted:8575DescriptionOnce upon a time there was a greedy King who ordered his chief Architect to build a wall around the King's castle. The King was so greedy, that he would not listen to his Architect's proposals to build a b
阅读全文