WLOG, assume a≤b≤c. If we choose only one stone, the diameter of the sphere is 2a. If we want to choose two stones, we should find another stone whose two of its edges are b and c, since we must expand the shortest side to get a bigger sphere. We can use a set to maintain the length of the edge and the index.