From 5e74d7dcd947832bdf46894eb177401936c51bac Mon Sep 17 00:00:00 2001 From: buren Date: Wed, 10 Dec 2025 19:28:19 +0000 Subject: [PATCH] comment 10-2, w/ explanation --- 10/ex2.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/10/ex2.py b/10/ex2.py index e17e9f9..0bdbd87 100644 --- a/10/ex2.py +++ b/10/ex2.py @@ -1,4 +1,13 @@ from pulp import LpProblem, LpVariable, LpMinimize, lpSum, PULP_CBC_CMD +""" +ok to clarify the solution here: +modelling this as ilp -> +variable for each button representing how many times it is pressed - minimize this! +constraints for each joltage thingy? idk - (buttons that increment it * number of times pressed) *must equal goal so it matches expected value*! +if button doesnt increment 0 * wtv is still 0 so doesnt matter +boom done city +""" + def solve(goal, buttons): # hence another thing i havent done in years prob = LpProblem("Operation_Dumbass_Elves", LpMinimize)