Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: Common Substrings
Description A substring of a string T(i, k)=T_{i}T_{i}_{+1}...T_{i+k}_{-1}, 1≤i≤i+k-1≤|T|.Given two strings S = {(i, j, k) | k≥K, A(i, k)=B(j, k)}.You are to give the value of | Input The input file contains several blocks of data. For each block, the first line contains one integer 1 ≤ | Output For each case, output an integer | Sample Input 2 aababaa abaabaa 1 xx xx 0 Sample Output 22 5 Source POJ Monthly--2007.10.06, wintokk |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator