【题目】 原题地址 给定一个字符串 S S S,求 ∑ 1 ≤ i < j ≤ n l c p ( i , j ) l c s ( i , j ) [ l c p ( i , j ) ≤ k 1 ] [ l c s ( i , j ) ≤ k 2 ] \sum_{1\leq i<j\leq n}lcp(i,j)lcs(i,j)[lcp(i,j)\leq k_1][lcs(i,j)\leq k_2] 1≤i<j≤n∑l…
正题
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid5115 题目大意
有 n n n只狼,击败第 i i i只狼会扣 a i a_i ai加上于其相邻的狼的 b l b r b_lb_r blbr点 h p hp hp。注意该狼被击败后会使原来于其相邻的狼变的相邻。 解题思路
显然区间 d p …
Dire Wolf Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid5115 Description Dire wolves, also known as Dark wolves, are extraordinarily large and powerful wolves. Many, if not all, Dire Wolves appear to originate …