摘要:
ou should process m queries over a set D of strings. Each query is one of three kinds: Note that you should solve the problem in online mode. It means 阅读全文
摘要:
You are given n strings ti. Each string has cost ci. Let's define the function of string , where ps, i is the number of occurrences of s in ti, |s| is 阅读全文
摘要:
A permutation p of length n is a sequence of distinct integers p1, p2, ..., pn (1 ≤ pi ≤ n). A permutation is an identity permutation, if for any i th 阅读全文