Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
122353 毛靖平 图像相似度 C++ Accepted 3 MS 1208 KB 465 2025-06-15 15:12:04

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; long long a[1000][1000],m[1000][1000]; int main(){ int n,b=0,k=0,r; cin>>n>>r; for(int i=1;i<=n;i++){ for(int j=1;j<=r;j++){ cin>>a[i][j]; } } for(int i=1;i<=n;i++){ for(int j=1;j<=r;j++){ cin>>m[i][j]; } } for(int i=1;i<=n;i++){ for(int j=1;j<=r;j++){ if(m[i][j]==a[i][j]){ k++; } } } printf("%.2lf",k*100.0/(n*r)); return 0; }