#include using namespace std; using ll = long long; #define rep(i, srt, end) for (long long i = (srt); i < (long long)(end); i++) void solve() { ll n; cin >> n; vector a(n); rep(i, 0, n) cin >> a[i]; sort(a.rbegin(), a.rend()); ll ans = 0, ptr = 0; rep(i, 0, n) { if(ptr == n) break; rep(j, 0, 1LL<