private HelperGroup better(HelperGroup a, HelperGroup b, int R) {
		if (a.totalCapacity >= R && b.totalCapacity < R)
			return a;
		if (a.totalCapacity < R && b.totalCapacity >= R)
			return b;
		if (a.totalCapacity < R && b.totalCapacity < R)
			return max(a, b);
		
		return min(a, b);
	}