摘要:
B. Intercepted Messagetime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputHacker Zhor... 阅读全文
posted @ 2018-03-14 23:17
GhostCai
阅读(102)
评论(0)
推荐(0)
摘要:
A. Left-handers, Right-handers and Ambidexterstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputst... 阅读全文
posted @ 2018-03-14 23:15
GhostCai
阅读(162)
评论(0)
推荐(0)
摘要:
A. Protect Sheeptime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBob is a farmer. ... 阅读全文
posted @ 2018-03-14 23:12
GhostCai
阅读(122)
评论(0)
推荐(0)
摘要:
题目描述某人有一套玩具,并想法给玩具命名。首先他选择WING四个字母中的任意一个字母作为玩具的基本名字。然后他会根据自己的喜好,将名字中任意一个字母用“WING”中任意两个字母代替,使得自己的名字能够扩充得很长。现在,他想请你猜猜某一个很长的名字,最初可能是由哪几个字... 阅读全文
posted @ 2018-03-14 23:04
GhostCai
阅读(153)
评论(0)
推荐(0)
摘要:
为了在即将到来的晚会上有更好的演出效果,作为AAA合唱队负责人的小A需要将合唱队的人根据他们的身高排出一个队形。假定合唱队一共N个人,第i个人的身高为Hi米(1000 18501700, 1850, 1900 因为 1700 16501750, 1650, 1700... 阅读全文
posted @ 2018-03-14 01:15
GhostCai
阅读(251)
评论(0)
推荐(0)
摘要:
求回文子串的长度,mp[i]保存以i为中心的回文子串的半径(长度一半) 利用mx和id,避免重复暴力求解,达到O(n)的时间复杂度 预先填充一些无关紧要的字符 #include<iostream> #include<cstring> #include<cstdio> using namespace 阅读全文
posted @ 2018-03-14 00:34
GhostCai
阅读(111)
评论(0)
推荐(0)
摘要:
fail 失配数组 fail[i]表示以i为结尾的非前缀子串与s的前缀的最大匹配长度 在拼接两字符串后,求fail数组的同时就能求出匹配位置(fail[i]==len_origin的i-2*len_origin) #include<iostream> #include<cstdio> #includ 阅读全文
posted @ 2018-03-14 00:34
GhostCai
阅读(116)
评论(0)
推荐(0)
浙公网安备 33010602011771号