Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iomanip>
- #include <iostream>
- #include <functional>
- #include <algorithm>
- #include <math.h>
- #include <cmath>
- #include <string>
- #include <vector>
- #include<set>
- #include<map>
- #include <time.h>
- #include <fstream>
- using namespace std;
- typedef long long ll;
- typedef double d;
- typedef long long ll;
- vector <char > v;
- int l;
- void solve(int x){
- if (x == l){
- for (int i = 0; i < v.size(); i++){
- cout << v[i];
- }cout << endl;
- return;
- }
- v.push_back('0');
- solve(x + 1);
- v.pop_back();
- v.push_back('1');
- solve(x + 1);
- v.pop_back();
- }
- int main()
- {
- cin >> l;
- solve(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement