Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
26069 Andrew宥杨 图像相似度 C++ 通过 0 MS 252 KB 514 2023-08-30 13:49:44

Tests(1/1):


#include <iostream> using namespace std; int main(){ int a,b,cnt=0; cin>>a>>b; int sum=a*b; int num1[a][b],num2[a][b]; for (int row=0;row<a;row++){ for (int col=0;col<a;col++){ cin>>num1[row][col]; } } for (int row=0;row<a;row++){ for (int col=0;col<a;col++){ cin>>num2[row][col]; } } for (int row=0;row<a;row++){ for (int col=0;col<a;col++){ if(num1[row][col]==num2[row][col]){ cnt++; } } } printf("%.2f",float(cnt/float(sum)*100)); return 0; }


测评信息: