标签:最大权值 force pre other code class div and span
A 模拟
B 大力分类讨论
或者是取巧的方法,观察到如果可能出现循环,由于循环节<=2,答案只能是0,1,inf.
//其实也要讨论,只不过代码变短了许多
C 枚举结尾的位置,类dp一波 //f[i] = 以i为头的子串最大权值
Codeforces Round #407 (Div. 2)
标签:最大权值 force pre other code class div and span
原文地址:http://www.cnblogs.com/supy/p/6898089.html