2 条题解

  • 0
    @ 2024-5-31 21:00:14

    来个简单易懂的。

    #include <iostream>
    using namespace std;
    int n,m,a[101][101],b[101][101];
    int main()
    {
    	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];
    			if(b[i][j]+a[i][j]==0)
    			{
    				cout << 0 << " ";
    			}
    			else
    			{
    				cout << 1 << " ";
    			}
    		}
    		cout << endl;
    	}
    	return 0;
    }
    

    编写不易【5分钟搞定好吧】,给个赞吧!

    信息

    ID
    3103
    时间
    1000ms
    内存
    256MiB
    难度
    2
    标签
    递交数
    98
    已通过
    41
    上传者