Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
110907 | 刘珩宇 | 图像相似度 | C++ | Compile Error | 0 MS | 0 KB | 624 | 2025-02-23 18:48:14 |
#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,i,j,a[101][101],b[101][101],s=0,z; cin>>m>>n; z=m*n; for(i=1;i<=m;i++){ for(j=1;j<=n;j++){ cin>>a[i][j]; } } for(i=1;i<=m;i++){ for(j=1;j<=n;j++){ cin>>b[i][j]; } } for(i=1;i<=m;i++){ for(j=1;j<=n;j++){ if(a[i][j]==b[i][j]){ s++; } } } printf("%.2lf",s*1.0/z); return 0; }
Main.cc: In function 'int main()': Main.cc:8:6: error: 'm' was not declared in this scope cin>>m>>n; ^