Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- \_\
- (_**)
- __) #_
- ( )...() => HI
- || | |I|
- || | |()__/
- /\(___)
- */
- #include<bits/stdc++.h>
- using namespace std;
- using lli = int64_t;
- int main(){
- ios::sync_with_stdio(false);
- cin.tie(nullptr);
- //generating subsequence of a string for smaller input
- string s;
- cin >> s;
- int bit = (1 << (int) s.size()) - 1;
- for(int i = 1; i <= bit; i++){
- int x = i,y = 0;
- while(x){
- if(x & 1){
- cout << s[y];
- }
- y += 1;
- x >>= 1;
- }
- cout << "\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement