浓缩的都是精华
#include <iostream>
using namespace std;
int n;
unsigned int N[1010][1010];
int main(){
cin >> n;
N[1][1] = 1;
for (int i = 2; i <= n; i ++ )for(int j = 1; j <= i; j++)N[i][j] = N[i-1][j]+N[i-1][j-1];
for (int i = 1; i <= n; i ++ )for(int j = 1; j <= i; j++){
cout << N[i][j] << ' ';
if(j == i)cout << endl;
}
return 0;
}