Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
40524 chenyifei 图像相似度 C++ Accepted 0 MS 264 KB 371 2024-02-11 22:32:10

Tests(1/1):


#include<iostream> using namespace std; int main(){ int n, m,cnt=0; int a[105][105],b[105][105]; cin>>n>>m; for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ cin>>a[i][j]; } } for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ cin>>b[i][j]; if(a[i][j]=b[i][j]) cnt++; } } double c=cnt*100.0/(n*m); printf("%.2f",c); return 0; }


Judgement Protocol: