提交时间:2026-04-10 14:47:18

运行 ID: 86928

#include <iostream> #include <string> using namespace std; int main() { double p; string s1, s2; cin >> p >> s1 >> s2; int cnt = 0; int len = s1.size(); for (int i = 0; i < len; i++) { if (s1[i] == s2[i]) { cnt++; } } if ((double)cnt / len >= p) { cout << "yes" << endl; } else { cout << "no" << endl; } return 0; }