22143_DeBruijncode

2022-5-16 18:21| 发布者: Hocassian| 查看: 24| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-5-89506146266000-Problem List-采集的数据-后羿采集器.html

Pro.ID

22143

Title

De Bruijn code

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=22143

AC

4

Submit

4

Ratio

100.00%

时间&空间限制

  • Time Limit: 2000/1000 MS (Java/Others)     Memory Limit: 65536/65536 K (Java/Others)
  • 描述

    De Bruijn code is a binary code. lt constitutes of 2k binary bits forming a circle.

    It has 2k binary sequences with length k and different starting positions.

    And each binary sequence with length k is different from any other one.

    Give you value of k, find a De Bruijn code. For example Figure 1 shows a De Bruijn code with k = 4.

    Figure 1  De Bruijn code with k = 4

    输入

    A line containing a integer k which is between 1 and 20, inclusive.

    Input is terminated by EOF.

    输出

    Description

    De Bruijn code is a binary code. lt constitutes of 2k binary bits forming a circle.

    It has 2k binary sequences with length k and different starting positions.

    And each binary sequence with length k is different from any other one.

    Give you value of k, find a De Bruijn code. For example Figure 1 shows a De Bruijn code with k = 4.

    Figure 1  De Bruijn code with k = 4

    Input

    A line containing a integer k which is between 1 and 20, inclusive.

    Input is terminated by EOF.

    Output

    A string representing the De Bruijn code.

    Sample Input

    1

    Sample Output

    01

    Source

    样例输入

    1

    样例输出

    01

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部