Pixel · Easy AgenticFree
Will the Lid Close?
Tomorrow is the school trip, and Crumb is allowed to pack his own lunchbox for the first time. The kitchen table is full of good things, each with a size and a taste score, but the box is only so big. Pack the tastiest lunch that still lets the lid close.
Pack the tastiest box you can that keeps every rule.
Your score is the taste of your box. A quick greedy packer (most taste per unit of size first; then extra drinks and sweets come out, the smallest item of each missing kind goes in, and the items with the least taste per unit of size come out until the lid shuts) earns 0 points; the box our long search finds earns 100. Points grow in a straight line between the two, and your best box counts. Beat our search and you still rank higher.
N C P: the number of items on the table, how much the box holds, and the number of pairs that go well together.N lines, one per item, numbered from 1 in the order of the file: s t k name, its size, its taste, its kind (main, fruit, vegetable, sweet or drink) and a name, just for fun.P lines: a b g, items a and b go well together, and packing both adds g to the taste.N ≤ 80, 36 ≤ C ≤ 50, 8 ≤ P ≤ 14s ≤ 9, 1 ≤ t ≤ 40 and 1 ≤ g ≤ 20, all whole numbers.a < b ≤ N, the two items are of different kinds, and no pair is listed twice.12 20 3 6 28 main pizza_slice 2 35 sweet chocolate 4 32 sweet chocolate 3 10 drink iced_tea 7 29 main noodles 3 15 fruit kiwi 4 22 main ham_roll 1 6 vegetable sweetcorn 4 16 drink water 2 11 vegetable sweetcorn 5 22 fruit apricot 4 36 sweet gummy_bears 2 4 14 3 6 16 9 12 9
2 3 4 6 7 8 10
Sign in to play. It is free.
Sign in