HDU1867 - A + B for you again】的更多相关文章

A + B for you again Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3061    Accepted Submission(s): 755 Problem Description Generally speaking, there are a lot of problems about strings process…
点击打开链接 Problem Description Generally speaking, there are a lot of problems about strings processing. Now you encounter another such problem. If you get two strings, such as "asdf" and "sdfg", the result of the addition between them is…
Generally speaking, there are a lot of problems about strings processing. Now you encounter another such problem. If you get two strings, such as "asdf" and "sdfg", the result of the addition between them is "asdfg", for &quo…
记住这张图,getnext就是对一个已知的待匹配的串进行分析,nex[i]表示当a[i]匹配失败后我能跳到哪里,继续尝试匹配,而不是每一次失败都从头再来,先来看看代码 const int maxn = 1e5; int net[maxn]; char a[maxn]; void get_next(int len) { int i = 0,j = -1; nex[0] = -1;//别忘记初始化,和汽车的发动机一样重要 while(i < len) { if(j == -1 || a[i] ==…