consider long corridor divide n square cell size 1 time 1 these cell number 1 n leave rightThere people corridor hooligan security guard initially hooligan ath cell guard bth cell ne b one possible situation the corridor consist 7 cell hooligan 3rd cell guard 6th n 7 3 b 6 there m firecracker hooligan pocket ith firecracker explode s_i second litthe following event happen second sequentially exactly follow order firstly hooligan move adjacent cell cell cell 1 cell 1 leave corridor stay cell currently if hooligan do not light firecracker drop the hooligan can not cell guard secondly firecracker drop explode Formally firecracker j drop Tth second explode T s_jth second example firecracker s_j 2 drop 4th second explode 6th second finally guard move cell close hooligan if guard moves cell hooligan hooligan catch obviously hooligan catch soon late corridor finite his goal maximum number firecracker explode catch act order maximize number firecracker explode caughtyour task calculate number firecracker hooligan act optimally