Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.46 KB | None | 0 0
  1.     /* pos is the amount of correct positions in the string size */
  2.     int pos = 0, fail = 0;
  3.     for(int i = 0; i < 4; i++) {
  4.         /* pos is sum of minor occurrences of a DNA segment */
  5.         if(dna1[i] > dna2[i]) pos += dna2[i];
  6.         else pos += dna1[i];
  7.     }
  8.     /* s-pos is the amont of incorrect occurrences regardless of
  9.      * permutations, if the amount is higher than the error margin
  10.      * then we failed */
  11.     if(s-pos > n) fail = 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement