Home > Back-end >  C write the longest string
C write the longest string

Time:10-19

Everyone a great god, and help to look at how to write,
Problem description
Small A want to lu nn root string, each string of length for the dd, small want to find out A nn root string have A substring, makes the largest the length of the substring,

Data input
In the string from the file. In reading data,

The first line of input two positive integer n, dn, d,

The nn lines, each line of input a length of dd string containing only lowercase letters,

Results output
Output to the string. The file out,

Output line of an integer in nn a string of length of the longest common substring,

The input sample
3 6
Aabcab
Abcaab
Bcabca

Sample output
4

CodePudding user response:

Do you have any input data size
  • Related