// Path: src/main/java/com/flipkart/fdp/optimizer/api/IInputJob.java
// public interface IInputJob extends Comparable<IInputJob> {
// 	long getJobSize();
// 
// 	String getJobKey();
// }
// 
// Path: src/main/java/com/flipkart/fdp/optimizer/api/IJobLoadOptimizer.java
// public interface IJobLoadOptimizer {
// 	public List<Set<IInputJob>> getOptimizedLoadSets(
// 			Set<? extends IInputJob> jobs, int noOfWorkers);
// }


import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
import com.flipkart.fdp.optimizer.api.IInputJob;
import com.flipkart.fdp.optimizer.api.IJobLoadOptimizer;
							i++;
							j++;
						}
					}
				} else {
					if (o1.size == o2.size) {

						if (o1.equals(o2)) {
							return 0;
						} else {
							return -1;
						}
					}

					return (-1) * (int) (o1.size - o2.size);
				}
				return -1;
			}
		});

		set.addAll(copySet);

		List<Set<IInputJob>> optimizedBuckets = new ArrayList<Set<IInputJob>>();

		while (true) {
			Bucket bucket = set.first();
			if (bucket.size < average || set.last().size == average) {
				break;
			}
			if (bucket.size - bucket.inputJobs.first().getJobSize() < average) {
// Path: src/main/java/com/flipkart/fdp/optimizer/api/IInputJob.java
// public interface IInputJob extends Comparable<IInputJob> {
// 	long getJobSize();
// 
// 	String getJobKey();
// }
// 
// Path: src/main/java/com/flipkart/fdp/optimizer/api/IJobLoadOptimizer.java
// public interface IJobLoadOptimizer {
// 	public List<Set<IInputJob>> getOptimizedLoadSets(
// 			Set<? extends IInputJob> jobs, int noOfWorkers);
// }


// Path: src/main/java/com/flipkart/fdp/optimizer/impl/PTASOptimizer.java
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
import com.flipkart.fdp.optimizer.api.IInputJob;
import com.flipkart.fdp.optimizer.api.IJobLoadOptimizer;

							i++;
							j++;
						}
					}
				} else {
					if (o1.size == o2.size) {

						if (o1.equals(o2)) {
							return 0;
						} else {
							return -1;
						}
					}

					return (-1) * (int) (o1.size - o2.size);
				}
				return -1;
			}
		});

		set.addAll(copySet);

		List<Set<IInputJob>> optimizedBuckets = new ArrayList<Set<IInputJob>>();

		while (true) {
			Bucket bucket = set.first();
			if (bucket.size < average || set.last().size == average) {
				break;
			}
			if (bucket.size - bucket.inputJobs.first().getJobSize() < average) {
				optimizedBuckets.add(bucket.inputJobs);