you play strategic video game yeah run good problem legend in game control large army goal conquer n castle opponentlets describe game process detail Initially control army k warrior your enemy control n castle conquer ith castle need a_i warrior good game do not lose warrior take castle army stay fight after control castle recruit new warrior army formally capture ith castle b_i warrior join army furthermore capture castle later defend leave warrior castle castle consider defend each castle importance parameter c_i total score sum importance value defend castle there way defend castle currently castle leave warrior defend castle m oneway portal connect castle each portal characterised number castle u v portal hold u v a portal follow currently castle u send warrior defend castle v obviously order warrior defend castle leave armyyou capture castle fix order capture second after capture castle capture castle 1 recruit new warrior castle leave warrior defend castle use number portal lead castle castle have small number as soon capture castle action castle will not available youIf moment game do not warrior capture castle lose your goal maximize sum importance value defend castle note hire new warrior castle defend use portal lead capture score calculate afterwardsCan determine optimal strategy capturing defend castle