| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 85534 | sh25_ganzy | 矩阵乘法 | C++ | 通过 | 0 MS | 260 KB | 452 | 2026-03-13 15:24:46 |
#include<bits/stdc++.h> using namespace std; int a[1000][1000],b[1000][1000]; int main(){ int n,m,k; cin>>n>>m>>k; for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ cin>>a[i][j]; } } for(int i=0;i<m;i++){ for(int j=0;j<k;j++){ cin>>b[i][j]; } } for(int i=0;i<n;i++){ for(int j=0;j<k;j++){ int s=0; for(int x=0;x<=m-1;x++){ s+=a[i][x]*b[x][j]; } cout<<s<<" "; } cout<<endl; } return 0; }