private static void qsort(MilkFarmer[] milkFarmers, int start, int end) {
        if (start >= end) return;
        int l = start;
        int r = end;
        int pivot = milkFarmers[(l + r) / 2].p;
        while (l <= r) {
            while (milkFarmers[l].p < pivot) l++;
            while (milkFarmers[r].p > pivot) r--;
            if (l <= r) {
                MilkFarmer tmp = milkFarmers[l];
                milkFarmers[l] = milkFarmers[r];
                milkFarmers[r] = tmp;
                l++; r--;
            }
        }
        if (l < end) qsort(milkFarmers, l, end);
        if (r > start) qsort(milkFarmers, start, r);
    }