#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long int nat; int main() { nat num_tests, num_items, num_cakes, num_drinks; cin >> num_tests; for(nat test = 0; test < num_tests; ++test) { cin >> num_items >> num_cakes >> num_drinks; nat sum_prices = 0; vector cake_price(num_cakes); vector drink_price(num_drinks); for(nat i = 0; i < num_items; ++i) { nat price; cin >> price; sum_prices += price; if(i < num_cakes) { cake_price[i] = price; } else if(i < num_cakes+num_drinks) { drink_price[i-num_cakes] = price; } } // for(auto i : cake_price) // { // cout << "Cake price: " << i << endl; // } // // for(auto i : drink_price) // { // cout << "Drink price: " << i << endl; // } const unsigned int FIXED_PRECISION = 3; double avg = (double)sum_prices / num_items; long long int avg_fixed_point = round(avg*(1< cake(0,LLONG_MAX), drink(0,LLONG_MAX); for(nat i = 0; i < num_cakes+num_drinks; ++i) { if(i < num_cakes) { //cout << abs((cake_price[i]<>FIXED_PRECISION) << " " << (drink.second>>FIXED_PRECISION) << endl; } return 0; }