HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Exhaustive search & Backtracking > problem:


50708 - Binary Strings

Guest
• Discussion of problem (1)

Section problems

• 50711 - Snail Trails
• 50472 - Minimum Sum Triangle
• 50306 - Beautiful Numbers
• 50716 - All Palindromes
• 50714 - The knight
• 50713 - Castle and the girls
• 50710 - Permutations
• 50709 - k-ary Strings
• 50708 - Binary Strings
• 50996 - Checkers - the shortest path
• Check-Mate
• 50479 - Bit Compressor
• 50486 - Problems and Programmers
• 50712 - Moon algebra
• 50717 - Hurdle Jumping
• 50840 - Tanker trucks
• 50490 - Across the River

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Prepared by Ibrahim Mesecan.

Binary Strings

Question: A binary code represents data or any instructions using only the two binary digits, 0 and 1. Make a program to generate all the binary strings with the length given (n).

Input specification
You will be given one integer (n) the length of of binary strings where 1 ≤ n ≤ 12.

Output specification
Show all binary strings with the length n. Every string starts from 0 and then goes to 1. Each string is shown in a separate line. No space is used within the characters of a string.

Sample Input I   
 3
Sample Input II   
 4
Sample Output I   
000
001
010
011
100
101
110
111
Sample Output II   
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111


Для отправки решений необходимо выполнить вход.

www.contester.ru