ADAMATCH - Ada and Nucleobase
Ada the Ladybug is helping her friend who is biologist. He examines DNA. Actually he has a long DNA of one bug, consisting of adenine, cytosine, guanine and thymine and he wants to know whether another bug might be relative to first bug. A bug is relative to another bug if his his DNA has very low Hamming Distance with some substring of the first bug.
Your job is to find the lowest hamming distance between second DNA and any substring of first DNA.
Input contains only two lines: first DNA (s) and second DNA (r).
It is true that 0 < |r| ≤ |s| ≤ 5*105
|s| means length of string s.
All strings contains only A, C, T, and G .
Print minimal Hamming Distance (the number of mismatched nucleobases) of any substring of s and r (the substring MUST have length |r|)
ACTGACTGACTG AAAAAACCA ACGC ACTTTG ACTGACTGACTG
@bashkort: I'm not well acquainted with the new features they would introduce, but C++17 and C++20 sound like reasonable requests to me. I recommend sending an email to firstname.lastname@example.org (this email address is listed on the About page) to ask admins whether they would be willing to add an updated C++.
I hate spoj.com, always get complitation error qwq
can any body taught me how fft work?
Is there any chance of getting AC with Java?
Nice problem to use fft.
@Min_25: Sorry for that :'( (sadly I have low "overlook" over SPOJ database problems )
Almost the same problem as http://www.spoj.com/problems/MAXMATCH/.
@[Rampage] Blue.Mary: Thank you for first-solving (==> testing). Have nice day!