time limit per test:3 seconds memory limit per test:256 megabytes input:standard input output:standard output Leonid works for a small and promising start-up that works on decoding the human genome. His duties include solving complex problems of find…