Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
8272 | 刘芃伽 | 图像相似度 | C++ | Wrong Answer | 0 MS | 280 KB | 735 | 2025-06-22 11:27:20 |
#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() using namespace std; int main(){ int n; cin>>n; int a[101][101],b[101][101]; for(int i=0;i<n;i++){ for(int j=1;j<=n;j++){ cin>>a[i][j]; } } for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ cin>>b[i][j]; } } double s=0; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ if(a[i][j]==b[i][j]){ s++; } } } printf("%.2lf\n",s*100/(n*n)); return 0; }
------Input------
10 10 0 1 0 0 1 0 1 1 0 1 0 0 0 1 0 0 1 0 1 1 0 0 1 1 0 0 0 0 0 1 0 1 0 0 0 0 1 1 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 0 1 1 1 1 1 0 1 1 0 1 1 1 0 1 1 0 1 0 1 0 0 0 1 1 1 1 1 1 0 0 1 0 0 1 1 0 1 0 0 1 0 1 1 1 0 1 1 0 1 1 1 0 1 1 1 1 1 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 1 0 1 0 0 0 1 0 1 1 0 0 1 0 1 0 1 1 0 0 0 1 1 0 0 0 0 0 0 1 1 1
------Answer-----
49.00
------Your output-----
55.00