Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
63612 李琥博 图像相似度 C++ Accepted 4 MS 352 KB 421 2024-01-19 11:53:32

Tests(10/10):


Code:

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