6 条题解

  • 0
    @ 2024-7-18 14:37:25

    #include <bits/stdc++.h> using namespace std; int q[105][105],w[105][105],e[105][105]; int main(){ int a,z,s,x,d,c=0,f=0,v=0,g=0; cin>>a>>z; for(s=1;s<=a;s++){ for(x=1;x<=z;x++){ cin>>q[s][x]; } } for(s=1;s<=a;s++){ for(x=1;x<=z;x++){ cin>>w[s][x]; } } for(s=1;s<=a;s++){ for(x=1;x<=z;x++){ e[s][x]=w[s][x]+q[s][x]; cout<<e[s][x]<<" "; } cout<<endl; }

    return 0;
    

    }

    • 0
      @ 2024-7-18 14:37:04

      #include <bits/stdc++.h> using namespace std; int q[105][105],w[105][105],e[105][105]; int main(){ int a,z,s,x,d,c=0,f=0,v=0,g=0; cin>>a>>z; for(s=1;s<=a;s++){ for(x=1;x<=z;x++){ cin>>q[s][x]; } } for(s=1;s<=a;s++){ for(x=1;x<=z;x++){ cin>>w[s][x]; } } for(s=1;s<=a;s++){ for(x=1;x<=z;x++){ e[s][x]=w[s][x]+q[s][x]; cout<<e[s][x]<<" "; } cout<<endl; }

      return 0;
      

      }

      • 0
        @ 2024-6-12 17:41:04

        ``

        #include<bits/stdc++.h>
        using namespace std;
        const int maxn=105;
        int a[105][105],b[105][105],c[105][105];
        int main(){
        	int n,m;
        	cin>>n>>m;
        	for(int i=1;i<=n;i++){
        		for(int j=1;j<=m;j++){
        			cin>>a[i][j];
        		}
        	}
        	for(int i=1;i<=n;i++){
        		for(int j=1;j<=m;j++){
        			cin>>b[i][j];
        	}
        }
        for(int i=1;i<=n;i++){
        		for(int j=1;j<=m;j++){
        		c[i][j]=a[i][j]+b[i][j];
        		cout<<c[i][j]<<" ";
        	}
        	cout<<endl;
        	}
        	return 0;
        }
        
        • 0
          @ 2024-6-7 17:49:14

          [ ]

          0/65536

          • 0
            @ 2024-6-7 17:43:40

            #include<bits/stdc++.h> using namespace std; int a[105][105],b[105][105],c[105][105]; int main(){ int n,m; cin>>n>>m; for(int i = 1;i<=n;i++){ for(int j = 1;j<=m;j++){ cin>>a[i][j]; }

            }
            for(int i = 1;i<=n;i++){
            	for(int j = 1;j<=m;j++){
            		cin>>b[i][j];
            	}
            }
            for(int i = 1;i<=n;i++){
            	for(int j = 1;j<=m;j++){
            		c[i][j] = a[i][j]+b[i][j];
            		cout<<c[i][j]<<" ";
            	}
            	cout<<endl;
            }
            
            return 0;
            

            }

            • @ 2024-6-7 17:45:52

              #include<bits/stdc++.h> using namespace std; int a[105][105],b[105][105],c[105][105]; int main(){ int n,m; cin>>n>>m; for(int i = 1;i<=n;i++){ for(int j = 1;j<=m;j++){ cin>>a[i][j]; }

              }
              for(int i = 1;i<=n;i++){
              	for(int j = 1;j<=m;j++){
              		cin>>b[i][j];
              	}
              }
              for(int i = 1;i<=n;i++){
              	for(int j = 1;j<=m;j++){
              		c[i][j] = a[i][j]+b[i][j];
              		cout<<c[i][j]<<" ";
              	}
              	cout<<endl;
              }
              
              return 0;
              

              }

          • -1
            @ 2024-7-16 13:56:12
            #include<bits/stdc++.h>
            using namespace std;
            int a[105][105],b[105][105],c[105][105];
            int main(){
            	int n,m;
            	cin>>n>>m;
            	for(int i=1;i<=n;i++){
            		for(int j=1;j<=m;j++){
            			cin>>a[i][j];
            		}
            	}
            	for(int i=1;i<=n;i++){
            		for(int j=1;j<=m;j++){
            			cin>>b[i][j];
            	}
            }
            for(int i=1;i<=n;i++){
            		for(int j=1;j<=m;j++){
            		c[i][j]=a[i][j]+b[i][j];
            		cout<<c[i][j]<<" ";
            	}
            	cout<<endl;
            	}
            	return 0;
            }
            
            • 1

            信息

            ID
            154
            时间
            1000ms
            内存
            128MiB
            难度
            4
            标签
            (无)
            递交数
            280
            已通过
            126
            上传者