Company: Walmart_12march
Difficulty: medium
The Magical Theme Problem Description In the futuristic world of Energon, you've inherited a lab that specializes in producing energy cells with powers of 2. Your task is to manage the lab by producing energy cells and fulfilling orders for specific power requirements. You'll handle two operations: GENERATE x : Create an energy cell with power 2 x and add it to your inventory. ORDER w : Check if you can exactly fulfill an order for power w by combining available energy cells from your inventory. Input Format The first line contains an integer M, the number of operations. The next M lines each contain two integers o[i] and v[i], describing the operation: If o[i] = 1, it's a GENERATE with v[i] as the exponent. If o[i] = 2, it's an ORDER with v[i] as the requested power. If o[i] = 0, it's an ORDER with v[i] as the requested power. Output Format For each ORDER , print "YES" if you can fulfill it with exact combinations, otherwise print "NO". Constraints 1 <= M <= 10 5 0 <= v[i] &l