Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
6636 | 张文曦 | 图像相似度 | C++ | Accepted | 2 MS | 348 KB | 715 | 2025-03-08 15:30:25 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() #include<limits.h> using namespace std; int main(){ int m,n,a[101][101],b[101][101],c=0; cin>>m>>n; for(int i=1;i<=m;i++){ for(int j=1;j<=n;j++){ cin>>a[i][j]; } } for(int i=1;i<=m;i++){ for(int j=1;j<=n;j++){ cin>>b[i][j]; } } for(int i=1;i<=m;i++){ for(int j=1;j<=n;j++){ if(a[i][j]==b[i][j]) c++; } } printf("%.2lf",c*1.0/(n*m)*100); return 0; }