Skip to main content
Mat's user avatar
Mat's user avatar
Mat's user avatar
Mat
  • Member for 6 years, 11 months
  • Last seen more than 1 year ago
  • Québec, Canada
awarded
awarded
awarded
comment
Subset optimization with composite aggregate functions
When you say i=5 is the maximum you mean that S=Q ? i starts at 0, and there are 6 elements in your set
comment
Subset optimization with composite aggregate functions
What I mean is if you start at i=Q[N-1], the max element, and go down, you must find the global maximum before reaching Q[N/2]. Correct me if I'm wrong.
awarded
comment
Subset optimization with composite aggregate functions
Nice explanation ! Most elements there I managed to find too, so it kind of confirms my own conclusions. However, could you check the smaller possible optimisations ? I'd really like to have this be the fastest. I'm thinking like doing 1 ≤ i ≤ (N-1)/2, and y could be P[i]/A, which bypasses creating any subset. Thoughts ?
Loading…
awarded