Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

Number of words

Revision en1, by aarshee, 2015-06-15 07:28:42

How to find the number of words of length N<4000, given that there are K number of forbidden sequences(K<2000). Each forbidden sequence is given and length of a forbidden sequence is less than N. Each word is made up of S number of characters (S<4000). So total number of words are S^N. Sum of length of forbidden sequences is less than 4000.

Cheers

Tags algorithms, dynamic programming

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English aarshee 2015-06-15 07:28:42 367 Initial revision (published)