Help me in solving DSAAGP430 problem

My issue

For your code also output isnot coming

My code


#include<bits/stdc++.h>
using namespace std;

int main() {
    int T;
    cin >> T;
    while (T--) {
        int N, Z;
        cin >> N >> Z;
        multiset<int> A;
        for (int i = 0; i < N; i++) {
            int x;
            cin >> x;
            A.insert(x);
        }
        int cnt = 0;
        while (Z > 0 && !A.empty()) {
            auto it = A.end();
            it--;
            int x = min(Z, *it);
            Z -= x;
            A.erase(it);
            cnt++;
            A.insert(*it / 2);
        }
        cout << (Z > 0 ? "Evacuate" : to_string(cnt)) << endl;
    }
    return 0;
}


Learning course: Data Structures and Algorithms
Problem Link: https://www.codechef.com/learn/course/dsa-detailed/DSAAG90/problems/DSAAGP430

Again it showing time limited exceeded