cf/mirror

Palindromic Matrix

CF
1118C1700· expert2s256 MB⌨ stdin/stdout

Examples

Sample 1of 4
Input
4
1 8 8 1 2 2 2 2 2 2 2 2 1 8 8 1
Output
YES
1 2 2 1
8 2 2 8
8 2 2 8
1 2 2 1
Sample 2of 4
Input
3
1 1 1 1 1 3 3 3 3
Output
YES
1 3 1
3 1 3
1 3 1
Sample 3of 4
Input
4
1 2 1 9 8 4 3 8 8 3 4 8 9 2 1 1
Output
NO
Sample 4of 4
Input
1
10
Output
YES
10
1118C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)