a multisubject competition come the competition m different subject participant choose that s Alex coach form competition delegation student he n candidate for ith person know subject s_i candidate specialize r_i skill level specialization level negative the rule competition require delegation choose subset subject participate the restriction number student team participate choose subject sameAlex decide candidate participate subject specialize now Alex wonder choose maximize total sum skill level delegate skip competition year valid nonempty delegation negative sumOf course Alex do not spare money delegate choose participate competition