func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int t;     cin >> t;     while (t--) {       int n1 = 0;       int n2 = 0;       int n4 = 0;       int n8 = 0;       int n16 = 0;       int n32 = 0;       int n64 = 0;       int n128 = 0;       int n256 = 0;       int n512 = 0;       int n1024 = 0;       int n2048 = 0;       bool flag = false;       int n;       cin >> n;       for (int i = 0; i < n; i++) {         int temp;         cin >> temp;         if (temp == 2048) {           n2048++;           flag = true;         }         if (flag == false) {           if (temp == 1)             n1++;           else if (temp == 2)             n2++;           else if (temp == 4)             n4++;           else if (temp == 8)             n8++;           else if (temp == 16)             n16++;           else if (temp == 32)             n32++;           else if (temp == 64)             n64++;           else if (temp == 128)             n128++;           else if (temp == 256)             n256++;           else if (temp == 512)             n512++;           else if (temp == 1024)             n1024++;         }       }       if (n2048 >= 1) {         cout <<  YES  << endl;         continue;       }       int temp;       temp = n1 / 2;       n2 += temp;       temp = n2 / 2;       n4 += temp;       temp = n4 / 2;       n8 += temp;       temp = n8 / 2;       n16 += temp;       temp = n16 / 2;       n32 += temp;       temp = n32 / 2;       n64 += temp;       temp = n64 / 2;       n128 += temp;       temp = n128 / 2;       n256 += temp;       temp = n256 / 2;       n512 += temp;       temp = n512 / 2;       n1024 += temp;       temp = n1024 / 2;       n2048 += temp;       if (n2048 >= 1) {         cout <<  YES  << endl;       } else {         cout <<  NO  << endl;       }     }     return 0;   }   