4 条题解

  • 1
    @ 2025-4-25 17:57:38
    #include<bits/stdc++.h> 
    using namespace std; 
    const int N=1e3+10; 
    int main(){ 
        char a[N],b[N]; 
        double n; 
        cin>>n>>a>>b; 
        double cnt; 
        for(int i=0;i<strlen(a);i++) if(a[i]==b[i]) cnt++;  
        double r=cnt/strlen(a); 
        if(r>n) cout<<"yes";
        else cout<<"no"; 
    }
    • -1
      @ 2024-7-25 11:49:54

      #include<bits/stdc++.h> using namespace std; const int N=1e3+10; int main(){ char a[N],b[N]; double x; cin>>x>>a>>b; double cnt; int len=strlen(a); for(int i=0;i<len;i++){ if(a[i]==b[i]){ cnt++; } } double y=cnt/len; if(y>x){ cout<<"yes"; } else cout<<"no"; }

      • -1
        @ 2024-6-16 10:38:39

        #include<bits/stdc++.h> using namespace std; int s_s(int a){

        } int main(){ string a,b; double n,s=0; cin>>n; cin>>a>>b; for(int i=0;i<a.size();i++){ if(a[i]==b[i])s++; }

        if(n<=s/a.size())cout<<"yes";
        else cout<<"no";
        

        return 0; } //荣泽仁

        • -1
          @ 2023-1-4 11:51:43
          #include<bits/stdc++.h>
          using namespace std;
          double cnt;
          string a,b;
          double ans;
          int main()
          {
          	ios::sync_with_stdio(false);
          	cin.tie(0);
          	cout.tie(0);
          	cin>>cnt>>a>>b;
          	for(int i=0;i<a.size();i++)
          	{
          		if(a[i]==b[i])ans++;
          	}
          	int len=a.size();
          	ans=ans/len;
          	if(ans>=cnt)printf("yes");
          	else printf("no");
          	return 0;
          }
          
          • 1

          信息

          ID
          1107
          时间
          1000ms
          内存
          128MiB
          难度
          3
          标签
          递交数
          327
          已通过
          113
          上传者