-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample.py
More file actions
15 lines (11 loc) · 728 Bytes
/
Copy pathsample.py
File metadata and controls
15 lines (11 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import search_combos
values = "19157 13184 -1712 71397 17117 99999 77514 83002 -37856 96765 12298 -49214 -39541 -30826 33724 48876 -24915 4641 3255 -28090"
keys = "A101 B123 1330 AVB 45A b78H 7h0h 098h 97 6k 6g 98h 0h09h0 g7g6 C534 33g 34g. 34g34 23rt3 4ggdw4"
targets = "438567 34755"
# search all possible combinations, including combined target sums
search_combos.find(values, targets, i_keys = keys, i_combine_targets=True, i_split_combined_targets=True)
# search only combinations with 3 to 6 items
#search_combos.find(values, targets, i_range=range(3, 7))
# using a single target, not using keys
target = 339094
search_combos.find(values, target)