you play computer game in game lead party m hero clear dungeon n monster each monster characterize power a_i each hero characterize power p_i endurance s_iThe heroe clear dungeon day day in begin day choose hero exactly go enter dungeon daywhen hero enters dungeon challenge monster defeat previous day hero defeat k monster hero fight monster k 1 when hero fight monster possible outcomes monster power strictly great hero power hero retreat dungeon the current day end monster defeat after defeat monster hero continue fight monster leave dungeon he leave dungeon defeat number monster equal endurance day ith hero defeat s_i monster day monster defeat fight monster when hero leave dungeon current day endsyour goal defeat monster what minimum number day need achieve goal each day use exactly hero possible hero do not fight monster each hero arbitrary number time