利用贪心解决
#include
#include
using namespace std;
vector cp;
int n,ans = 0;
int main(){
scanf("%d", &n);
cp.resize(n);
for(int i = 0; i < n; i++){
cin>>cp[i];
}
sort(cp.begin(), cp.end());
int pos = n/2,ans = n;
for(int i = 0; i < n/2; i++){
while(cp[i] * 2 > cp[pos] &&pos < n) pos++;
if(pos >= n) break;
ans --;
pos ++;
}
cout<