Suppose there are $ K $ buckets each can be filled upto $ N-1 $ balls. The gain on putting $ i $  balls in the $ k^{th} $ bucket is given by $ \Delta l_{k,i},  \, i \in [1,N-1] $. The problem is to put $ \lambda $ balls in those buckets to maximize the overall gain.

How do we solve it?

The answer is no in general. I.e, there are finite non-isomorphic groups G and H such that there exists a bijection between their elements which also induces a bijection between their subgroups.

For this, I used two non-isomorphic groups which not only have the same subgroup lattice (which certainly is necessary), but also have the same conjugacy classes. There are two such groups of size 605, both a semidirect product $(C_{11}\times C_{11}) \rtimes C_5$ (see this site for details on the construction). In the small group library of GAP, these are the groups with id [ 605, 5 ] and. [ 605, 6 ]. These are provably non-isomorphic (you can construct the groups as described in the reference I gave, and then use GAPs IdSmallGroup command to verify that the groups described there are the same as the ones I am working with here). With a short computer program, one can now construct a suitable bijection.

First, let us take the two groups:

gap> G:=SmallGroup(605, 5);    
<pc group of size 605 with 3 generators>
gap> H:=SmallGroup(605, 6);
<pc group of size 605 with 3 generators>


The elements of these groups are of order 1, 5 or 11, and there are 1, 484 and 120 of each. We will sort them in a "nice" way (that is, we try to match each subgroup of order 5 to another one, element by element) and obtain a bijection from this. First, a helper function to give us all elements in "nice" order:

ElementsInNiceOrder := function (K)
    local elts, cc;
    elts := [ One(K) ];
    cc := ConjugacyClassSubgroups(K, Group(K.1));
    Append(elts, Concatenation(List(cc, g -> Filtered(g,h->Order(h)=5))));
    Append(elts, Filtered(Group(K.2, K.3), g -> Order(g)=11));
    return elts;
end;;


Now we can take the elements in the nice order and define the bijection $f$:

gap> Gelts := ElementsInNiceOrder(G);;
gap> Helts := ElementsInNiceOrder(H);;
gap> f := g -> Helts[Position(Gelts, g)];;


Finally, we compute the sets of all subgroups of $G$ resp. $H$, and verify that $f$ induces a bijection between them:

gap> Gsubs := Union(ConjugacyClassesSubgroups(G));;          
gap> Hsubs := Union(ConjugacyClassesSubgroups(H));;
gap> Set(Gsubs, g -> Group(List(g, f))) = Hsubs;
true


Thus we have established the claim with help of a computer algebra system. From this, one could now obtain a pen & paper proof for the claim, if one desires so. I have not done this in full detail, but here are some hints.

Say $G$ is generated by three generators $g_1,g_2,g_3$, where $g_1$ generates the $C_5$ factor and $g_2,g_3$ generate the characteristic subgroup $C_{11}\times C_{11}$. We choose a similar generating set $h_1,h_2,h_3$ for $H$. We now define $f$ in two steps: First, for $0\leq n,m <11$ it shall map $g_2^n g_3^m$ to $h_2^n h_3^m$. 

This covers all elements of order 1 or 11, so in step two we specify how to map the remaining elements, which all have order 5. These are split into four conjugacy classes: $g_1^G$, $(g_1^2)^G$, $(g_1^3)^G$ and $(g_1^4)^G$. We fix any bijection between $g_1^G$ and $h_1^H$ and extend that to a bijection on all elements of order 5 by the rule $f((g_1^g)^n)=f(g_1^g)^n$. With some effort, one can now verify that this is a well-defined bijection between $G$ and $H$ with the desired properties. You will need to determine the subgroup lattice in each case; linear algebra helps a bit, as well as the fact that all subgroups have order 1, 5, 11, 55, 121 (unique) or 605. I'll leave the details to the reader, as I myself am happy enough with the computer result. 

UPDATE: as pointed out in another answer below by @dvitek (explained by @Ian Agol in comments), there is actually a much simpler example, which I somehow overlooked when I did my computer search. Credit to them, but just in case people want to reproduce their example with GAP, here is an input session doing just that:

gap> G:=SmallGroup(16,5);; StructureDescription(G);
"C8 x C2"
gap> H:=SmallGroup(16,6);; StructureDescription(H);
"C8 : C2"
gap> Gelts := ListX([1..8],[1,2],{i,j}->G.1^i*G.2^j);;
gap> Helts := ListX([1..8],[1,2],{i,j}->H.1^i*H.2^j);;
gap> f := g -> Helts[Position(Gelts, g)];;
gap> Gsubs := Union(ConjugacyClassesSubgroups(G));;
gap> Hsubs := Union(ConjugacyClassesSubgroups(H));;
gap> Set(Gsubs, g -> Group(List(g, f))) = Hsubs;
true

