Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* pos is the amount of correct positions in the string size */
- int pos = 0, fail = 0;
- for(int i = 0; i < 4; i++) {
- /* pos is sum of minor occurrences of a DNA segment */
- if(dna1[i] > dna2[i]) pos += dna2[i];
- else pos += dna1[i];
- }
- /* s-pos is the amont of incorrect occurrences regardless of
- * permutations, if the amount is higher than the error margin
- * then we failed */
- if(s-pos > n) fail = 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement