#include <iostream>
#include <vector>
using namespace std;

int main()
{
    int row, column;
    cin >> row >> column;

    //key code:申请空间  
    vector<vector<int> > a(row, vector<int>(column));


    //使用空间  
    for (int j = 0; j < row; j++)
        for (int k = 0; k < column; k++)
            a[j][k] = rand() % 100;

    for (int j = 0; j < row; j++)
    {
        cout << endl;
        for (int k = 0; k < column; k++)
        {
            a[j][k] = rand() % 100;
            cout << a[j][k] << "     ";
        }
    }

    return 0;

}

 

相关文章:

  • 2021-10-26
  • 2021-05-29
  • 2021-10-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-25
  • 2022-12-23
  • 2021-11-20
  • 2021-08-10
  • 2021-11-13
  • 2022-12-23
  • 2021-11-01
相关资源
相似解决方案