Help for this page

Select Code to Download


  1. or download this
    my $given = $ARGV[0];
    # ...
    ...
        }
        return 1;
    }
    
  2. or download this
    my $input = $ARGV[0];
    $input = str2val($input);
    ...
        my ($word, $val) = split /\t/;
        print "$word\n" if $is_subset{$input - $val};
    }
    
  3. or download this
    a = 1
    b = (a * max) + 1
    c = (b * max) + 1
    ...
    z = (y * max) + 1
    
  4. or download this
    sub str2val {
        my ($str) = @_;
    ...
        }
        return $str;
    }
    
  5. or download this
    my $input = $ARGV[0];
    my %is_subset = map {$_ => 1} powerset(split //, $input);
    ...
        # ...
        return map {join '', sort @$_} @subsets;
    }