<tex2html_verbatim_mark> Figure 1. DNA (Deoxyribonucleic Acid) is the molecule which contains the genetic instructions. It consists of four different nucleotides, namely Adenine, Thymine, Guanine, and Cytosine as shown in Figure 1. If we represent a…
#include <stdio.h>#include <string.h> int main(){ int a[4][1000]; // A/C/G/T在每列中出现的次数 char c, x; char bas[4] = { 'A', 'C', 'G', 'T' }; int T, m, n, i, j, k, dist; scanf("%d", &T); while (T--) { scanf(&…
https://cn.vjudge.net/problem/UVA-1368 二维的hamming距离算法: For binary strings a and b the Hamming distance is equal to the number of ones (population count) in a XOR b. int hamming_distance(unsigned x, unsigned y) { ; unsigned val = x ^ y; // Count the n…