It is a solution for the bucket problem. This program is used to judge wheter the number in the buckets can be added to get the number. In this process, the bucket can be used repeatly. If a subsets of buckets can be used to get the number, the program will return 1. If it cannot, 0 will be returned.
#Directory structure
The bucket directory struture is organized as follows:
bucket.pl - The solution program.
test_bucket.pl - A program that provide some tests for bucket.pl.
It is a perl program. You can run it in Linux or OS X.
#Usage
in bash
chmod +x bucket.pl
./bucket.pl <buckets> <number>
example:
./bucket.pl 3,5 100
1 will be returned.
#Contribution
Yue Wu (yuewu_mike@163.com)