2 条题解

  • 1
    @ 2025-8-4 20:48:04
    #include <iostream>
    #include <cstdio>
    using namespace std;
    int main()
    {
        int a,b,w[25][105]={};
        cin>>a>>b;
        int c,d,e;
        while(cin>>c>>d>>e)
        {
            w[c][d]=e;
        }
        for(int i=1;i<=a;i++)
        {
            for(int j=1;j<=a;j++)
            {
                cout<<w[i][j]<<' ';
            }
            cout<<"\n";
        }
        return 0;
    }
    
    
    • 0
      @ 2025-7-7 13:58:28

      阿巴阿巴阿巴

      #include <bits/stdc++.h>
      using namespace std;
      int mapp[100][100]={};
      int main()
      {
      	int m,n;
      	cin>>m>>n;
      	int x_1,y_1,c;
      	for(int i=1;i<=n;i++)
      	{
      		cin>>x_1>>y_1>>c;
      		mapp[x_1][y_1]=c;
      	}
      	for(int i=1;i<=m;i++)
      	{
      		for(int j=1;j<=m;j++)
      		{
      			cout<<mapp[i][j]<<" ";
      		}
      		cout<<endl;
      	}
      	return 0;
      }
      • 1

      信息

      ID
      150
      时间
      1000ms
      内存
      256MiB
      难度
      8
      标签
      递交数
      11
      已通过
      9
      上传者