poj1961Periodkmp求出fail数组后,前i个的重复子串就是i-fail(i)[crayon-66368d2813972870968453/]poj1276 CashMachine用f(i,j)表示前i种面值,达到j的面值和,所需要的第i种钞票的最少数量[crayon-66368d2813981863908139/]poj1702 Eva'sBalance先把n转为3进制,若p位为2,就在左盘放3^p,进位若p位为1,就在右盘放3^p[crayon-66368d281398c853460848/]poj1273 DrainageDitches大名鼎鼎的草地排水,网络流模板[crayon-6...
OpenJ_Bailian3254.约瑟夫问题2模拟,用vector比较方便[crayon-66368d2814886527691493/]poj2393.Yogurtfactory求出将酸奶保存到某一天的最小代价贪心[crayon-66368d28148a9833005164/]poj1321.棋盘问题回溯裸题[crayon-66368d28148b2945070463/]poj2576.TugofWarf(i,j,k)表示前i个选j个能不能凑成k,第一维滚动[crayon-66368d28148bb330176969/]poj1974.RebuildingRoads用f(i,j)表示子树i,剩j个结点需要至少删多少条边[c...
CrazyTownisaplaneonwhichthereareninfinitelineroads.Eachroadisdefinedbytheequationaix + biy + ci = 0,whereaiandbiarenotbothequaltothezero.Theroadsdividetheplaneintoconnectedregions,possiblyofinfinitespace.Let'scalleachsuchregionablock.Wedefineanintersectionasthepointwhereatleasttwodifferentroadsintersect.Yourhomeislocatedinoneoftheblocks.TodayyouneedtogettotheUniversity,alsolocatedin...
近期评论