2013年9月4日

摘要: Problem A#include using namespace std;#include const int maxn=1010;int used[maxn];int link[maxn];vector V[maxn];bool dp(int u){ int size = V[u].size(); for(int i=0; i>k,k) { cin>>n>>m; for (int i=0;i>a>>b; V[a].push_back (b+500); }/* for (i=0;i<10;i++)... 阅读全文
posted @ 2013-09-04 19:55 不知妖精 阅读(201) 评论(0) 推荐(0) 编辑

2013年9月3日

摘要: Time Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 45Accepted Submission(s) : 23#include #include using namespace std;char str1[1005]; char str2[1005]; int dp[1005][1005];int max(int a,int b){ int c=a>b?a:b; return c;}int main() { int i,j;... 阅读全文
posted @ 2013-09-03 19:53 不知妖精 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 寒冰王座Time Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 62Accepted Submission(s) : 30Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem Description不死族的巫妖王发工资拉,死亡骑士拿到一张N元的钞票(记住,只有一张钞票),为了防止自己在战斗中频繁的死掉,他决定给自己买一些道具,于是他来到了地精商店前.死亡骑士:"我要买道具! 阅读全文
posted @ 2013-09-03 10:35 不知妖精 阅读(181) 评论(0) 推荐(0) 编辑

2013年9月2日

摘要: Time Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 47Accepted Submission(s) : 21Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem DescriptionSpeakless很早就想出国,现在他已经考完了所有需要的考试,准备了所有要准备的材料,于是,便需要去申请学校了。要申请国外的任何大学,你都要交纳一定的申请费用,这可是很惊人的。Speakless 阅读全文
posted @ 2013-09-02 11:24 不知妖精 阅读(281) 评论(0) 推荐(0) 编辑
摘要: Time Limit : 2000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 117Accepted Submission(s) : 42Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem DescriptionMany years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man li 阅读全文
posted @ 2013-09-02 11:10 不知妖精 阅读(211) 评论(0) 推荐(0) 编辑

2013年8月30日

摘要: #include using namespace std;#include int Min(int a,int b){ int c=a>str1) { int len=strlen(str1); if (len==0) continue; str[0]='$'; str[1] = '#'; int i , j = 2; for (i=0;ii) { p[i]=Min(p[2*id-i],mx-i); //优化的关键 ... 阅读全文
posted @ 2013-08-30 20:14 不知妖精 阅读(190) 评论(0) 推荐(0) 编辑

2013年8月29日

摘要: Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input本题目包含多组测试,请处理到文件结束。#include using namespace std;const int maxn=200010;int max(int a,int b){ int c=a>b?a:b; return c;}struct Node { int left; int right;... 阅读全文
posted @ 2013-08-29 16:51 不知妖精 阅读(132) 评论(0) 推荐(0) 编辑

2013年8月24日

摘要: Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。中央情报局要研究敌人究竟演习什么战术,所以Tidy要随时向Derek汇报某一段连续的工兵营地一共有多少人,例如Derek问:“Tidy,马上汇报第3个营地到第10个营地共有多少人!”Tidy就要马上开始计算 阅读全文
posted @ 2013-08-24 17:15 不知妖精 阅读(199) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionGiven a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let’s say the phone catalogue listed these numbers:1. Emergency 9112. Alice 97 625 9993. Bob 91 12 54 26In this case, it’s not possible to call Bob, because the centr 阅读全文
posted @ 2013-08-24 09:45 不知妖精 阅读(198) 评论(0) 推荐(0) 编辑

2013年8月23日

摘要: #include using namespace std;#include const int maxn=26;struct node { node *next[maxn]; int step;};void Create(node *T,char *str){ int len=strlen(str); for (int i=0;inext [id]==NULL) { node *p=(node *)malloc(sizeof(node)); p->step =1; for (int j=0;... 阅读全文
posted @ 2013-08-23 20:43 不知妖精 阅读(172) 评论(0) 推荐(0) 编辑

导航