More problems that use the same idea as 2155F?
Difference between en2 and en3, changed 10 character(s)
Problem: [problem:2155F]↵

For this problem, it turns out that if you just iterate over the colors in the smaller of the two sets $C_u$ and $C_v$ (and also de-dupe queries), total complexity is bounded by something like $s \sqrt {q}$. More generally, let's say we have an array $a_i$ such that $\sum a_i = s$. If we pick $q$ distinct pairs of indices $x_i \leq y_i$, then it turns out that over all possible choices, $\sum \min(a_{x_i}, a_{y_i})$ is bounded by $s \sqrt {q}$, and equality is achieved when $a$ has $\sqrt{q}$ values equal to $\frac{s}{\sqrt{q}}$, and all other values equal to $0$.↵

Are there any other problems 
out there that use this very interesting bound?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English shsh 2025-10-06 17:13:27 8 Tiny change: '\sqrt {q}$, and equality is' -> '\sqrt {q}$. Equality is'
en3 English shsh 2025-10-06 09:29:42 10 Tiny change: ' problems out there that use ' -> ' problems that use '
en2 English shsh 2025-10-06 09:28:54 44
en1 English shsh 2025-10-06 09:27:53 686 Initial revision (published)