#include #include #include int main() { int N; std::vector v; int n,w=0; std::cin >> N; while(N--){ std::cin >> n; v.push_back(n); } std::sort(v.begin(),v.end()); //for(int i = 0;i ::iterator i = v.begin();i != v.end()-1;){ *(i+v.size()-1) += *(i + v.size()/2)/2; v.erase(i+v.size()/2); if(v.size() < 3) break; //for(int i = 0;i