Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
54971 zhangweiran 图像相似度 C++ Accepted 0 MS 260 KB 547 2024-11-01 15:46:54

Tests(1/1):


#include<bits/stdc++.h> using namespace std; int main() { int m, n, s = 0, a[100][100], b[100][100]; cin >> 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++; } cout << fixed << setprecision(2) << (double)s/(m*n)*100; return 0; }


Judgement Protocol: