private ArrayList<Rod> trackBack(double[][] profits, int idCount, int length, ArrayList<Rod> rods) {
		ArrayList<Rod> result = new ArrayList<Rod>();
		while(idCount > 0) {
			if(profits[idCount][length] != profits[idCount - 1][length]) {
				result.add(rods.get(idCount));
				length -= rods.get(idCount).getLength();
			}
			idCount--;
		}
		if(profits[idCount][length] > 0) {
			result.add(rods.get(idCount));
			length -= rods.get(idCount).getLength();
		}
		return result;
	}