CF610C.Harmony Analysis

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

The semester is already ending, so Danil made an effort and decided to visit a lesson on harmony analysis to know how does the professor look like, at least. Danil was very bored on this lesson until the teacher gave the group a simple task: find 44 vectors in 44 -dimensional space, such that every coordinate of every vector is 11 or 1-1 and any two vectors are orthogonal. Just as a reminder, two vectors in nn -dimensional space are considered to be orthogonal if and only if their scalar product is equal to zero, that is:

.Danil quickly managed to come up with the solution for this problem and the teacher noticed that the problem can be solved in a more general case for 2k2^{k} vectors in 2k2^{k} -dimensinoal space. When Danil came home, he quickly came up with the solution for this problem. Can you cope with it?

输入格式

The only line of the input contains a single integer kk ( 0<=k<=90<=k<=9 ).

输出格式

Print 2k2^{k} lines consisting of 2k2^{k} characters each. The jj -th character of the ii -th line must be equal to ' * ' if the jj -th coordinate of the ii -th vector is equal to 1-1 , and must be equal to ' ++ ' if it's equal to +1+1 . It's guaranteed that the answer always exists.

If there are many correct answers, print any.

输入输出样例

  • 输入#1

    2
    

    输出#1

    ++**
    +*+*
    ++++
    +**+

说明/提示

Consider all scalar products in example:

  • Vectors 11 and 22 : (+1)(+1)+(+1)(1)+(1)(+1)+(1)(1)=0(+1)·(+1)+(+1)·(-1)+(-1)·(+1)+(-1)·(-1)=0
  • Vectors 11 and 33 : (+1)(+1)+(+1)(+1)+(1)(+1)+(1)(+1)=0(+1)·(+1)+(+1)·(+1)+(-1)·(+1)+(-1)·(+1)=0
  • Vectors 11 and 44 : (+1)(+1)+(+1)(1)+(1)(1)+(1)(+1)=0(+1)·(+1)+(+1)·(-1)+(-1)·(-1)+(-1)·(+1)=0
  • Vectors 22 and 33 : (+1)(+1)+(1)(+1)+(+1)(+1)+(1)(+1)=0(+1)·(+1)+(-1)·(+1)+(+1)·(+1)+(-1)·(+1)=0
  • Vectors 22 and 44 : (+1)(+1)+(1)(1)+(+1)(1)+(1)(+1)=0(+1)·(+1)+(-1)·(-1)+(+1)·(-1)+(-1)·(+1)=0
  • Vectors 33 and 44 : (+1)(+1)+(+1)(1)+(+1)(1)+(+1)(+1)=0(+1)·(+1)+(+1)·(-1)+(+1)·(-1)+(+1)·(+1)=0
首页