Problem2019--noip2016 魔法阵

2019: noip2016 魔法阵

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 1  Solved: 1
[Status] [Submit] [Creator:]

Description



Sample Input Copy

30 8
1
24
7
28
5
29
26
24

Sample Output Copy

4 0 0 0
0 0 1 0
0 2 0 0
0 0 1 1
1 3 0 0
0 0 0 2
0 0 2 2
0 0 1 0

HINT

Source/Category