AC-automaton - JoishBadeR - Holy Sh*t

<[Sdoi2014]数数>,<Sdoi14R1D1T2 Problem Count>

Description

给定一个长度不超过1200的整数N,问从1~N的范围里有多少个整数的子串不包括S集合里的任何串。

|S|<=50,S集合中的所有串的长度和在1500范围内。样例:Input: 20 3 2 3 14 Output: 14 解释:1~20中不包含{2,3,14}的显然有{1,4,5,6,7,8,9,10,11,15,16,17,18,19}这么多

 

 

继续阅读




Host by is-Programmer.com | Power by Chito 1.3.3 beta | © 2007 LinuxGem | Design by Matthew "Agent Spork" McGee