上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 40 下一页

2013年9月5日

SPOJ 7758 Growing Strings AC自动机DP

摘要: 7758. Growing StringsProblem code: MGLAR10EnglishVietnameseGene and Gina have a particular kind of farm. Instead of growing animals and vegetables, asit is usually the case in regular farms, they grow strings. A string is a sequence of characters.Strings have the particularity that, as they grow, th 阅读全文

posted @ 2013-09-05 16:43 电子幼体 阅读(149) 评论(0) 推荐(0) 编辑

2013年9月4日

Codeforces Round #102 (Div. 2) //缺E

摘要: -----------------------A. Help Vasilisa the Wise 2---暴力枚举---#include using namespace std;int r1,r2,c1,c2,d1,d2;int a[2][2];bool solve(){ if (a[0][0]+a[0][1]!=r1) return false; if (a[1][0]+a[1][1]!=r2) return false; if (a[0][0]+a[1][0]!=c1) return false; if (a[0][1]+a[1][1]!=c2) return fa... 阅读全文

posted @ 2013-09-04 19:50 电子幼体 阅读(142) 评论(0) 推荐(0) 编辑

Codeforces Round #101 (Div. 2)

摘要: --------------A. Amusing Joke--前两行的字母恰好组成最后一行--#include #include using namespace std;char a[1111];int ch[26]={0};int main(){ cin>>a; for (int i=0;a[i];i++){ ch[a[i]-'A']++; } cin>>a; for (int i=0;a[i];i++){ ch[a[i]-'A']++; } cin>>a; for (int i=0;a[i];i++){ ... 阅读全文

posted @ 2013-09-04 16:13 电子幼体 阅读(201) 评论(0) 推荐(0) 编辑

2013年9月3日

poj 1769 Minimizing maximizer 线段树优化的dp

摘要: Minimizing maximizerTime Limit:5000MSMemory Limit:30000KTotal Submissions:3047Accepted:1187DescriptionThe company Chris Ltd. is preparing a new sorting hardware called Maximizer. Maximizer has n inputs numbered from 1 to n. Each input represents one integer. Maximizer has one output which represents 阅读全文

posted @ 2013-09-03 21:27 电子幼体 阅读(179) 评论(0) 推荐(0) 编辑

3734 Blocks DP矩阵优化入门

摘要: BlocksTime Limit:1000MSMemory Limit:65536KTotal Submissions:3665Accepted:1611DescriptionPanda has received an assignment of painting a line of blocks. Since Panda is such an intelligent boy, he starts to think of a math problem of painting. Suppose there are N blocks in a line and each block can be 阅读全文

posted @ 2013-09-03 20:37 电子幼体 阅读(164) 评论(0) 推荐(0) 编辑

2013年9月2日

Code Library 打印面

摘要: ---/*==============================================*\ | Code Library\*==============================================*//** head-file **/#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /** define-for **/#define REP( 阅读全文

posted @ 2013-09-02 19:30 电子幼体 阅读(128) 评论(0) 推荐(0) 编辑

2013年8月29日

Codeforces Round #197 (Div. 2)

摘要: -----------------A. Helpful Maths----将一个由+和123组成的式子从小到大排序...----#include #include #include #include using namespace std;const int maxn=1111;char s[maxn];vectorvc;int main(){ vc.clear(); cin>>s; int len=strlen(s); for (int i=0;i='1'&&s[i]#include #include #include using namespac 阅读全文

posted @ 2013-08-29 18:52 电子幼体 阅读(129) 评论(0) 推荐(0) 编辑

2013年8月28日

zoj 3195 Design the city LCA

摘要: Design the cityTime Limit:1 Second Memory Limit:32768 KBCerror is the mayor of city HangZhou. As you may know, the traffic system of this city is so terrible, that there are traffic jams everywhere. Now, Cerror finds out that the main reason of them is the poor design of the roads distribution, and 阅读全文

posted @ 2013-08-28 16:53 电子幼体 阅读(126) 评论(0) 推荐(0) 编辑

2013年8月27日

UVALive 4513 Stammering Aliens 字符串Hash求LCS

摘要: DescriptionDr.Ellie Arroway has established contact with an extraterrestrial civilization. However, all efforts to decode their messages have failed so far because, as luck would have it, they have stumbled upon a race of stuttering aliens! Her team has found out that, in every long enough message, 阅读全文

posted @ 2013-08-27 20:45 电子幼体 阅读(198) 评论(0) 推荐(0) 编辑

UVA 11996 Jewel Magic Splay+Hash

摘要: DescriptionProblem JJewel MagicI am a magician. I have a string of emeralds and pearls. I may insert new jewels in the string, or remove old ones. I may even reverse a consecutive part of the string. At anytime, if you point to two jewels and ask me, what is the length of the longest common prefix ( 阅读全文

posted @ 2013-08-27 20:41 电子幼体 阅读(259) 评论(0) 推荐(0) 编辑

上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 40 下一页

导航