Grasshopper Script for Curve Area Matching and Output Segregation

Hey, can you help me with creating a Grasshopper setup (either using components or a C# script) that does the following:

  1. I want to input a list of curves.
  2. The script should calculate the areas of these curves.
  3. After calculating the areas, it should find combinations of 1, 2, or 3 areas that add up to a specific target area I provide.
  4. It should then output the curves whose combined areas match the target, and also show the remaining curves that didn’t match.
  5. Ideally, I’d like the solution to be dynamic so I can change the target area and see the results update."

this point makes me think curve adjacency is something to take into account?