Stacks are sorted by total cost.
Gnolls: 20 * 5 = 1000
Lizardmen: 110 * 5 = 550
Flies: 220 * 4 = 880
Thus lizardmen stack (1) is the cheapest, then goes Flies (2), then gnolls (0).
Maybe I didn't get the point and you wanted to compare non by total stack cost, but by single unit cost.