polycarp n coin value ith coin a_i it guarantee value integer power 2 ie a_i 2d nonnegative integer number dPolycarp wants know answer q query the jth query describe integer number b_j the answer query minimum number coin necessary obtain value b_j subset coin Polycarp use coin if Polycarp can not obtain value b_j answer jth query 1the query independent answer query do not affect Polycarps coin