| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 79855 | sh25_wuyy | 基因相关性 | C++ | Accepted | 0 MS | 252 KB | 560 | 2026-01-04 14:48:11 |
#include <iostream> #include <string> using namespace std; int main() { double threshold; string dna1, dna2; cin >> threshold >> dna1 >> dna2; int length = dna1.length(); int matches = 0; for (int i = 0; i < length; i++) { if (dna1[i] == dna2[i]) { matches++; } } double similarity = static_cast<double>(matches) / length; if (similarity >= threshold) { cout << "yes" << endl; } else { cout << "no" << endl; } return 0; }