#include <iostream>
#include <string>

using namespace std;

int main() {
    double threshold;
    string dna1, dna2;
    cin >> threshold;
    cin >> dna1 >> dna2;

    int count = 0;
    int total = dna1.length();
    
    for (int i = 0; i < total; i++) {
        if (dna1[i] == dna2[i]) {
            count++;
        }
    }

    double similarity = (double)count / total;

    if (similarity >= threshold) {
        cout << "yes" << endl;
    } else {
        cout << "no" << endl;
    }

    return 0;
}
DNA序列相似性比对 - C++代码实现

原文地址: https://www.cveoy.top/t/topic/cERs 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录