Corrupted · Hard CodeFree
Opening Night
Opening night, and the costumes are a mess. Each performer fits only some costumes, and every fitting needs paid alterations. Dress as many performers as possible, then spend as little as you can.
Find the most performers you can dress, the lowest cost for that, and the pairs.
The pairs must be allowed, as many as possible, and as cheap as possible.
P Q E: performers, costumes and allowed pairs.E lines: p c w, performer p can wear costume c after alterations costing w.K cost, the performers dressed and the total cost.K lines: p c, a performer and their costume.P, Q ≤ 200; E ≤ 20 000 different pairs; 0 ≤ w ≤ 1 000 0004 4 7 1 1 1 1 2 5 2 1 3 3 2 2 3 3 4 4 3 6 4 4 9
4 21 1 2 2 1 3 3 4 4
Sign in to play. It is free.
Sign in