Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
111683 | 王奕杰 | 图像相似度 | C++ | Compile Error | 0 MS | 0 KB | 665 | 2025-03-03 20:10:02 |
#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,m,s=0; int a[101][101],b[101][101]; for(int i=1;i<=a;i++){ for(int j=1;j<=a;j++){ cin>>a[i][j]; } } for(int i=1;i<=b;i++){ for(int j=1;j<=b;j++){ cin>>b[i][j]; } } for(int i=1;i<=b;i++){ for(int j=1;j<=b;j++){ if(a[i][j]==b[i][j]) s++ } } printf("%.2lf",s/(n*m)*100) return 0; }
Main.cc: In function 'int main()': Main.cc:10:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] for(int i=1;i<=a;i++){ ^ Main.cc:11:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] for(int j=1;j<=a;j++){ ^ Main.cc:15:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] for(int i=1;i<=b;i++){ ^ Main.cc:16:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] for(int j=1;j<=b;j++){ ^ Main.cc:20:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] for(int i=1;i<=b;i++){ ^ Main.cc:21:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] for(int j=1;j<=b;j++){ ^ Main.cc:24:5: error: expected ';' before '}' token } ^ Main.cc:26:31: warning: format '%lf' expects argument of type 'double', but argument 2 has type 'int' [-Wformat=] printf("%.2lf",s/(n*m)*100) ^ Main.cc:27:5: error: expected ';' before 'return' return 0; ^