ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Сборники > Winner's Camp > задача:


03. 50673 - DNA Testing

Гость
• Обсуждение задачи (1)

Задачи сборника

• 51004 - Word Search Game
• 03. 50673 - DNA Testing
• 06. 50714 - The knight
• 12. 50723 - Tribonacci
• 04. 50649 - Puzzle
• 01. 50722 - Problemi i shkencetarit
• 02. 50376 - Sequences
• 05. 50713 - Castle and the girls
• 08. 50370 - Number of rectangles in ...
• 09. 50716 - All Palindromes

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Question by Arnold Drita.

DNA Tester

Scientists have recently found a new planet able to sustain life. Not only that, but this planet also has some life forms similair to those on earch.
Our job is, to analyse the DNA samples from those life forms, and compare them to DNA samples from our own creatures, and find the longest matching substring.


Input specification
First, you will be given two numbers, n and m : 1<=n,m<=2000, representing the length of the two strings. Then you will be given the strings themselves.

Output specification
Give the length of the longest matching DNA string on both DNA samples. Note, the DNA from creatures of our planet consists of only (A, T, C, G), but the DNA from the other planet can have any character from A to Z.


Input I
10 5
AMKGLCUITE
AGCTA
Output 1
4
     
Input 2
15 7
QWERTYUIOPAICUG
ATCGACT
Output 2
3

Для отправки решений необходимо выполнить вход.

www.contester.ru