# CodeForces 417E Square Table （暴力|随机）

a a
a a

a a b
a a b
b b d

a a b
a a b
c c d

#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<algorithm>
#include<queue>
#include<stack>
#include<cmath>
#include<vector>
#include<fstream>
#include<set>
#include<map>
#include<sstream>
#include<iomanip>
#define ll long long
using namespace std;
int n, m, sq[1111111];
int main() {
for (int i = 1; i <= 1000; i++) sq[i * i] = 1;
int i, j, k, h, flag = 0;
scanf("%d%d", &n, &m);
for (i = 1; i <= 100; i++) {
for (j = 1; j <= 100; j++) {
for (k = 1; k <= 100; k++) {
for (h = 1; h <= 100; h++) {
int a = (m - 1) * i * i + j * j;
int b = (n - 1) * i * i + k * k;
int c = (m - 1) * k * k + h * h;
int d = (n - 1) * j * j + h * h;
if (sq[a] && sq[b] && sq[c] && sq[d]) {
flag = 1;
break;
}
}
if (flag) break;
}
if (flag) break;
}
if (flag) break;
}
for (int x = 1; x <= n - 1; x++) {
for (int y = 1; y <= m - 1; y++) {
printf("%d ", i);
}
printf("%d\n", j);
}
for (int x = 1; x <= m - 1; x++) printf("%d ", k);
printf("%d\n", h);
return 0;
}


04-19 1419

08-31 1365

04-19 1134

11-16 1474

05-18 1364

09-09 1192

04-19 2423

05-26 10

04-18 2347

09-23 1277

05-19 1223

10-04 1120

03-10 3618

04-20 2230

10-03 1633

04-13 1310

09-26 1463

03-13 2345

11-20 1214

09-08 1241

04-14 59万+

03-13 15万+

03-04 14万+

03-08 2万+

04-25 6万+

03-10 13万+

03-10 18万+

03-12 11万+

03-13 11万+

03-18 1万+

03-19 8万+

03-19 3万+

03-22 4万+

03-23 4万+

03-24 3万+

03-25 3万+

05-08 5万+

03-25 9万+

03-29 21万+

03-29 10万+

03-30 16万+

05-31 6635

05-31 1万+

04-02 1万+

04-02 6028

04-02 4万+

04-06 1万+

04-06 7万+

04-09 8万+

04-09 3万+

05-17 8825

04-11 4万+

04-15 6万+

04-18 4万+

04-20 4万+

04-24 3万+

05-01 6576

05-03 1万+

05-16 5万+

05-06 1万+

05-07 3499

05-07 1万+

05-08 4万+

05-10 3465

05-14 6736

05-16 3735

05-16 1万+

05-17 5210

05-30 788

05-20 1120

05-18 2350

05-18 8621

05-27 1599

05-18 3763

05-28 1375

05-19 1万+

05-19 2014

05-21 8004

#### 石锤！今年Python要过苦日子了？ 程序员：我疯了！

©️2019 CSDN 皮肤主题: 像素格子 设计师: CSDN官方博客