10159_Stringsobits

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

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

Pro.ID

10159

Title

Stringsobits

Title链接

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

AC

8

Submit

43

Ratio

18.60%

时间&空间限制

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

    Consider an ordered set S of strings of N (1 ≤ N ≤ 31) bits. Bits, of course, are either 0 or 1.

    This set of strings is interesting because it is ordered and contains all possible strings of length N that have L (1 ≤ LN) or fewer bits that are '1'.

    Your task is to read a number I ( 1 ≤ I ≤ sizeof(S) ) from the input and print the Ith element of the ordered set for N bits with no more than L bits that are '1'.

    输入

    Multiple test cases.

    For each case, there is a single line with three space separated integers: N, L, and I.

    输出

    Description

    Consider an ordered set S of strings of N (1 ≤ N ≤ 31) bits. Bits, of course, are either 0 or 1.

    This set of strings is interesting because it is ordered and contains all possible strings of length N that have L (1 ≤ LN) or fewer bits that are '1'.

    Your task is to read a number I ( 1 ≤ I ≤ sizeof(S) ) from the input and print the Ith element of the ordered set for N bits with no more than L bits that are '1'.

    Input

    Multiple test cases.

    For each case, there is a single line with three space separated integers: N, L, and I.

    Output

    For each case, output a single line containing the integer that represents the I-th element from the order set, as described.

    Sample Input

    5 3 19

    Sample Output

    10011

    Source

    样例输入

    5 3 19

    样例输出

    10011

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部