928(1)
来源:互联网 发布:stc单片机是中国的吗 编辑:程序博客网 时间:2024/06/06 02:55
#include<iostream>using namespace std;int main(){ int a,b,c,d,i,j; cin>>a>>b; int a1[a*b]; for (i=0;i<=a*b-1;i++) { cin>>a1[i]; } cin>>c>>d; int a2[c*d]; for (i=0;i<=c*d-1;i++) { cin>>a2[i]; } int a3[a*d]={0}; if (b!=c) cout<<"error"<<endl; else { for(i=0;i<=a*d-1;i++) { int row=i/d; int col=i-row*d; // cout<<"row="<<row<<'\t'<<"col="<<col<<endl; for(j=0;j<=c-1;j++) { // cout<<"a1["<<b*row+j<<"]="<<a1[b*row+j]<<'\t'<<"a2["<<col+j*d<<"]="<<a2[col+j*d]<<endl; a3[i]=a3[i]+a1[b*row+j]*a2[col+j*d]; } // cout<<a3[i]<<endl; } int count; for(count=0;count<=a-1;count++) { for(i=0;i<=d-2;i++) { cout<<a3[i+count*d]<<" "; } cout<<a3[d-1+count*d]<<endl; } }}
阅读全文
0 0
- 928(1)
- TrojanHunter ver.4.6.928
- Nokia Lumia 928宣传片
- 东南928真题订正
- poj-1845 Sumdiv && nyoj - 928 小M的因子和
- NYOJ 928 小M的因子和(数论)
- 第928期机器学习日报(2017-04-03)
- 1
- 1
- 1
- 1
- 1
- 1
- 1》
- 1
- 1
- 1
- 1
- 字符串的各种操作
- 字符串流 转换为cin形式进行读写
- 控制反转
- 初学Jsp
- Mybatis映射文件中的#{}与${}
- 928(1)
- python核心编程v2.0 第14章习题答案
- CodeForces 427D Match & Catch
- 使用translate对元素造成类似position:relative的影响
- ffmpeg(ubuntu16.04):视频抽成帧(图片)/图片合成视频
- matplotlib相关
- Android 系统服务的两种注册方式
- pygame字体
- tensorflow中nn的padding