5 solutions
-
0
#include<bits/stdc++.h> using namespace std; const int N=1e2*5+10; char a[N],b[N]; int main() { int res=0; double y; cin>>y>>a>>b; int x; x=strlen(a); for(int i=0;i<x;i++) { if(a[i]==b[i]) { res++; } } double n; n=res*1.0/x; if(n>y) { cout<<"yes"; } else if(n<y) { cout<<"no"; } else { cout<<"yes"; } return 0; }
Information
- ID
- 914
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 1
- Tags
- (None)
- # Submissions
- 71
- Accepted
- 33
- Uploaded By