diff --git a/OfficeShelf/20_Multiplexboden.FCStd b/OfficeShelf/20_Multiplexboden.FCStd new file mode 100644 index 0000000..77e1e85 Binary files /dev/null and b/OfficeShelf/20_Multiplexboden.FCStd differ diff --git a/OfficeShelf/20_OfficeShelf.FCStd b/OfficeShelf/20_OfficeShelf.FCStd new file mode 100644 index 0000000..26f3ff3 Binary files /dev/null and b/OfficeShelf/20_OfficeShelf.FCStd differ diff --git a/OfficeShelf/20_Regalboden.FCStd b/OfficeShelf/20_Regalboden.FCStd new file mode 100644 index 0000000..e0cd2af Binary files /dev/null and b/OfficeShelf/20_Regalboden.FCStd differ diff --git a/OfficeShelf/20_RegalbodenQuerstuetzen.FCStd b/OfficeShelf/20_RegalbodenQuerstuetzen.FCStd new file mode 100644 index 0000000..bfde325 Binary files /dev/null and b/OfficeShelf/20_RegalbodenQuerstuetzen.FCStd differ diff --git a/OfficeShelf/20_StuetzkreuzHinten.FCStd b/OfficeShelf/20_StuetzkreuzHinten.FCStd new file mode 100644 index 0000000..113daa4 Binary files /dev/null and b/OfficeShelf/20_StuetzkreuzHinten.FCStd differ diff --git a/OfficeShelf/20_StuetzkreuzSeite.FCStd b/OfficeShelf/20_StuetzkreuzSeite.FCStd new file mode 100644 index 0000000..b55d3e8 Binary files /dev/null and b/OfficeShelf/20_StuetzkreuzSeite.FCStd differ diff --git a/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x20_IN5_1980.FCStd b/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x20_IN5_1980.FCStd new file mode 100644 index 0000000..9cee624 Binary files /dev/null and b/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x20_IN5_1980.FCStd differ diff --git a/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x20_IN5_414.FCStd b/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x20_IN5_414.FCStd new file mode 100644 index 0000000..4735c07 Binary files /dev/null and b/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x20_IN5_414.FCStd differ diff --git a/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x20_IN5_442.FCStd b/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x20_IN5_442.FCStd new file mode 100644 index 0000000..e3a5d98 Binary files /dev/null and b/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x20_IN5_442.FCStd differ diff --git a/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x20_IN5_620.FCStd b/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x20_IN5_620.FCStd new file mode 100644 index 0000000..7170f54 Binary files /dev/null and b/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x20_IN5_620.FCStd differ diff --git a/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x20_IN5_660.FCStd b/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x20_IN5_660.FCStd new file mode 100644 index 0000000..19213b7 Binary files /dev/null and b/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x20_IN5_660.FCStd differ diff --git a/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x20_IN5_848.FCStd b/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x20_IN5_848.FCStd new file mode 100644 index 0000000..ab1e868 Binary files /dev/null and b/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x20_IN5_848.FCStd differ diff --git a/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x20_IN5_905.FCStd b/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x20_IN5_905.FCStd new file mode 100644 index 0000000..6214e53 Binary files /dev/null and b/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x20_IN5_905.FCStd differ diff --git a/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x40_IN5_1980.FCStd b/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x40_IN5_1980.FCStd new file mode 100644 index 0000000..c301f12 Binary files /dev/null and b/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/20x40_IN5_1980.FCStd differ diff --git a/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/Winkel45_20x20_IN5.FCStd b/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/Winkel45_20x20_IN5.FCStd new file mode 100644 index 0000000..4fe5c0b Binary files /dev/null and b/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/Winkel45_20x20_IN5.FCStd differ diff --git a/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/Winkel_20x20_IN5.FCStd b/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/Winkel_20x20_IN5.FCStd new file mode 100644 index 0000000..1586080 Binary files /dev/null and b/OfficeShelf/Lib/Motedis/Aluprofil_20_I-Typ_Nut5/Winkel_20x20_IN5.FCStd differ diff --git a/OfficeShelf/Lib/Motedis/Aluprofil_40x40_I-Typ_Nut8/359mm.FCStd b/OfficeShelf/Lib/Motedis/Aluprofil_40x40_I-Typ_Nut8/359mm.FCStd new file mode 100644 index 0000000..0e69a16 Binary files /dev/null and b/OfficeShelf/Lib/Motedis/Aluprofil_40x40_I-Typ_Nut8/359mm.FCStd differ diff --git a/OfficeShelf/Lib/Motedis/Aluprofil_40x40_I-Typ_Nut8/415mm.FCStd b/OfficeShelf/Lib/Motedis/Aluprofil_40x40_I-Typ_Nut8/415mm.FCStd new file mode 100644 index 0000000..db0fa62 Binary files /dev/null and b/OfficeShelf/Lib/Motedis/Aluprofil_40x40_I-Typ_Nut8/415mm.FCStd differ diff --git a/OfficeShelf/Lib/Motedis/Aluprofil_40x40_I-Typ_Nut8/580mm.FCStd b/OfficeShelf/Lib/Motedis/Aluprofil_40x40_I-Typ_Nut8/580mm.FCStd new file mode 100644 index 0000000..cd5e1d3 Binary files /dev/null and b/OfficeShelf/Lib/Motedis/Aluprofil_40x40_I-Typ_Nut8/580mm.FCStd differ diff --git a/OfficeShelf/Lib/Motedis/Aluprofil_40x40_I-Typ_Nut8/660mm.FCStd b/OfficeShelf/Lib/Motedis/Aluprofil_40x40_I-Typ_Nut8/660mm.FCStd new file mode 100644 index 0000000..2a80f35 Binary files /dev/null and b/OfficeShelf/Lib/Motedis/Aluprofil_40x40_I-Typ_Nut8/660mm.FCStd differ diff --git a/OfficeShelf/Lib/Motedis/Aluprofil_40x40_I-Typ_Nut8/757mm.FCStd b/OfficeShelf/Lib/Motedis/Aluprofil_40x40_I-Typ_Nut8/757mm.FCStd new file mode 100644 index 0000000..f8bd809 Binary files /dev/null and b/OfficeShelf/Lib/Motedis/Aluprofil_40x40_I-Typ_Nut8/757mm.FCStd differ diff --git a/OfficeShelf/Lib/Motedis/Aluprofil_40x40_I-Typ_Nut8/870mm.FCStd b/OfficeShelf/Lib/Motedis/Aluprofil_40x40_I-Typ_Nut8/870mm.FCStd new file mode 100644 index 0000000..8f5525b Binary files /dev/null and b/OfficeShelf/Lib/Motedis/Aluprofil_40x40_I-Typ_Nut8/870mm.FCStd differ diff --git a/OfficeShelf/Lib/Motedis/Aluprofil_40x80_I-Typ_Nut8/1980mm.FCStd b/OfficeShelf/Lib/Motedis/Aluprofil_40x80_I-Typ_Nut8/1980mm.FCStd new file mode 100644 index 0000000..eaf581a Binary files /dev/null and b/OfficeShelf/Lib/Motedis/Aluprofil_40x80_I-Typ_Nut8/1980mm.FCStd differ diff --git a/OfficeShelf/Lib/Motedis/Winkel_40ITypNut8.FCStd b/OfficeShelf/Lib/Motedis/Winkel_40ITypNut8.FCStd new file mode 100644 index 0000000..b203e38 Binary files /dev/null and b/OfficeShelf/Lib/Motedis/Winkel_40ITypNut8.FCStd differ diff --git a/OfficeShelf/Lib/Motedis/Winkelverbinder_45Grad_40_I-Typ_Nut8.FCStd b/OfficeShelf/Lib/Motedis/Winkelverbinder_45Grad_40_I-Typ_Nut8.FCStd new file mode 100644 index 0000000..bf1d3df Binary files /dev/null and b/OfficeShelf/Lib/Motedis/Winkelverbinder_45Grad_40_I-Typ_Nut8.FCStd differ diff --git a/OfficeShelf/Multiplexboden.FCStd b/OfficeShelf/Multiplexboden.FCStd new file mode 100644 index 0000000..12fa5d3 Binary files /dev/null and b/OfficeShelf/Multiplexboden.FCStd differ diff --git a/OfficeShelf/OfficeShelf.FCStd b/OfficeShelf/OfficeShelf.FCStd new file mode 100644 index 0000000..4262cb7 Binary files /dev/null and b/OfficeShelf/OfficeShelf.FCStd differ diff --git a/OfficeShelf/Regalplatte.FCStd b/OfficeShelf/Regalplatte.FCStd new file mode 100644 index 0000000..26a39f9 Binary files /dev/null and b/OfficeShelf/Regalplatte.FCStd differ diff --git a/OfficeShelf/StuetzkreuzHinten.FCStd b/OfficeShelf/StuetzkreuzHinten.FCStd new file mode 100644 index 0000000..de352c9 Binary files /dev/null and b/OfficeShelf/StuetzkreuzHinten.FCStd differ diff --git a/OfficeShelf/StuetzkreuzSeite.FCStd b/OfficeShelf/StuetzkreuzSeite.FCStd new file mode 100644 index 0000000..cd9aa42 Binary files /dev/null and b/OfficeShelf/StuetzkreuzSeite.FCStd differ diff --git a/OfficeShelf/zuschnitt.py b/OfficeShelf/zuschnitt.py new file mode 100644 index 0000000..4970619 --- /dev/null +++ b/OfficeShelf/zuschnitt.py @@ -0,0 +1,176 @@ +import time + + +class LengthError(ValueError): + pass + + +class Cut(object): + + def __init__(self, l): + self.Length = l + + +class CutableRod(object): + + def __init__(self): + self.Length = 6000 + self.CutThickness = 0 + self.Remainder = self.Length + self.Cuts = [] + + def addCut(self, cut): + if not self.canAddCut(cut): + raise LengthError("Cut.Length=%i, Remainder=%i" % (cut.Length, self.Remainder)) + self.Cuts.append(cut) + self.Remainder -= cut.Length + self.Remainder -= self.CutThickness + + def copy(self): + new_rod = CutableRod() + new_rod.Length = self.Length + new_rod.CutThickness = self.CutThickness + new_rod.Remainder = self.Remainder + for c in self.Cuts: + new_rod.Cuts.append(c) + return new_rod + + def canAddCut(self, cut): + return self.Remainder >= cut.Length + + def variety(self): + """ Amount of different cut lengths + """ + lengths = [] + for cut in self.Cuts: + if cut.Length not in lengths: + lengths.append(cut.Length) + return len(lengths) + + +class CutSolution(object): + + def __init__(self): + self.Rods = [] + + def isBetterThan(self, other): + if self.rods() != other.rods(): + return self.rods() < other.rods() + elif self.remainder() != other.remainder(): + return self.remainder() < other.remainder() + elif self.variety() != other.variety(): + return self.variety() < other.variety() + else: + return False + + def copy(self): + new_solution = CutSolution() + for r in self.Rods: + new_solution.Rods.append(r.copy()) + return new_solution + + def variety(self): + variety = 0 + for r in self.Rods: + v = r.variety() + if v > 1: + variety += v + return variety + + def rods(self): + return len(self.Rods) + + def remainder(self): + remainder = 0 + for r in self.Rods: + remainder += r.Remainder + return remainder + + def print(self, short=False): + if not short: + print("\nSolution") + for idx_r in range(len(self.Rods)): + r = self.Rods[idx_r] + print("Rod ", idx_r, ": ", end="", sep="") + for idx_c in range(len(r.Cuts)): + c = r.Cuts[idx_c] + print(c.Length, " ", end="", sep="") + print("(-", r.Remainder, ")", sep="") + + print("Rods=", self.rods(), ", Remainder=", self.remainder(), ", Variety=", self.variety(), sep="") + + +class CutRequest(object): + + def __init__(self): + self.Cuts = [] + self.CreatedSolutions = [] + + + def add(self, amount, length): + for i in range(amount): + c = Cut(length) + self.Cuts.append(c) + + + def _iterate(self, current_solution, remaining_cuts): + if len(remaining_cuts) == 0: + return current_solution + + best_solution = None + + tested_lengths = [] + for idx_try in range(len(remaining_cuts)): + cut = remaining_cuts[idx_try] + + # avoid testing same length again + if cut.Length in tested_lengths: + continue + tested_lengths.append(cut.Length) + + # create temporary solution for trial + trysol = CutSolution() if current_solution is None else current_solution.copy() + + # add cut to temporary solution + if len(trysol.Rods) == 0 or not trysol.Rods[-1].canAddCut(cut): + trysol.Rods.append(CutableRod()) + trysol.Rods[-1].addCut(cut) + + # create list of remaining other cuts + remaining_cuts_without_try = [] + for idx_other in range(len(remaining_cuts)): + if idx_other != idx_try: + cut_other = remaining_cuts[idx_other] + remaining_cuts_without_try.append(cut_other) + + # solve for tried remaining cuts + trysol = self._iterate(trysol, remaining_cuts_without_try) + + # keep best solution + if best_solution is None or trysol.isBetterThan(best_solution): + best_solution = trysol + if current_solution is None: + print("Better Solution: ", end="") + best_solution.print(True) + + return best_solution + + + def arrangeCuts(self): + time_start = time.time() + solution = self._iterate(None, self.Cuts) + solution.print() + time_stop = time.time() + print("duration: %0.1f" % (time_stop - time_start)) + + +if __name__ == "__main__": + + cr = CutRequest() + cr.add(8, 660); + cr.add(16, 620); + cr.add(1, 905); + cr.add(2, 442); + cr.add(2, 848); + cr.add(4, 414); + cr.arrangeCuts() diff --git a/OfficeShelf/zuschnitt_cpp/zuscnitt/.gitignore b/OfficeShelf/zuschnitt_cpp/zuscnitt/.gitignore new file mode 100644 index 0000000..4a0b530 --- /dev/null +++ b/OfficeShelf/zuschnitt_cpp/zuscnitt/.gitignore @@ -0,0 +1,74 @@ +# This file is used to ignore files which are generated +# ---------------------------------------------------------------------------- + +*~ +*.autosave +*.a +*.core +*.moc +*.o +*.obj +*.orig +*.rej +*.so +*.so.* +*_pch.h.cpp +*_resource.rc +*.qm +.#* +*.*# +core +!core/ +tags +.DS_Store +.directory +*.debug +Makefile* +*.prl +*.app +moc_*.cpp +ui_*.h +qrc_*.cpp +Thumbs.db +*.res +*.rc +/.qmake.cache +/.qmake.stash + +# qtcreator generated files +*.pro.user* +CMakeLists.txt.user* + +# xemacs temporary files +*.flc + +# Vim temporary files +.*.swp + +# Visual Studio generated files +*.ib_pdb_index +*.idb +*.ilk +*.pdb +*.sln +*.suo +*.vcproj +*vcproj.*.*.user +*.ncb +*.sdf +*.opensdf +*.vcxproj +*vcxproj.* + +# MinGW generated files +*.Debug +*.Release + +# Python byte code +*.pyc + +# Binaries +# -------- +*.dll +*.exe + diff --git a/OfficeShelf/zuschnitt_cpp/zuscnitt/CMakeLists.txt b/OfficeShelf/zuschnitt_cpp/zuscnitt/CMakeLists.txt new file mode 100644 index 0000000..94b0036 --- /dev/null +++ b/OfficeShelf/zuschnitt_cpp/zuscnitt/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.5) + +project(zuscnitt LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +SET(CMAKE_CXX_FLAGS_DEBUG "-O3") +SET(CMAKE_C_FLAGS_DEBUG "-O3") + +add_executable(zuscnitt main.cpp) + +install(TARGETS zuscnitt + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + diff --git a/OfficeShelf/zuschnitt_cpp/zuscnitt/main.cpp b/OfficeShelf/zuschnitt_cpp/zuscnitt/main.cpp new file mode 100644 index 0000000..ddcbad3 --- /dev/null +++ b/OfficeShelf/zuschnitt_cpp/zuscnitt/main.cpp @@ -0,0 +1,287 @@ +#include +#include +#include +#include +#include + +bool intvectcontains(const std::vector &heystack, int needle) { + for (auto i: heystack) { + if (i == needle) return true; + } + return false; +} + + +class Cut { + +public: + Cut(int l) { + this->Length = l; + } + + int length() const { + return this->Length; + } + +private: + Cut(Cut &); // deny copying + int Length = 0; +}; + + +class CutableRod { +public: + CutableRod() { + this->Length = 6000; + this->CutThickness = 9; + this->Remainder = this->Length; + } + + CutableRod(CutableRod &other) { + this->Length = other.Length; + this->CutThickness = other.CutThickness; + this->Remainder = other.Remainder; + for (auto c : other.Cuts) { + this->Cuts.push_back(c); + } + } + + void addCut(std::shared_ptr cut) { + assert(this->canAddCut(cut)); + this->Cuts.push_back(cut); + this->Remainder -= cut->length(); + this->Remainder -= this->CutThickness; + } + + bool canAddCut(std::shared_ptr cut) { + return this->Remainder >= cut->length(); + } + + std::vector> cuts() { + return this->Cuts; + } + + int remainder() { + return this->Remainder; + } + + int variety(void) { + std::vector lengths; + for (auto cut : this->Cuts) { + if (!intvectcontains(lengths, cut->length())) + lengths.push_back(cut->length()); + } + return lengths.size(); + } + +private: + int Length = 0; + int CutThickness = 0; + int Remainder = 0; + std::vector> Cuts; +}; + + +class CutSolution { +public: + CutSolution() { + } + + CutSolution(CutSolution &other) { + for (auto r_other: other.Rods) { + auto r_copy = std::make_shared(*r_other); + this->Rods.push_back(r_copy); + } + } + + void addCut(std::shared_ptr cut) { + + // add rod if empty + if (this->Rods.empty()) { + auto new_rod = std::make_shared(); + this->Rods.push_back(new_rod); + } + + // add rod if cannot add cut + if (!this->Rods.back()->canAddCut(cut)) { + auto new_rod = std::make_shared(); + this->Rods.push_back(new_rod); + } + + // add cut to last rod + this->Rods.back()->addCut(cut); + } + + bool isBetterThan(const CutSolution &other) { + + // compare rod amount + int my_r = this->rods(); + int other_r = other.rods(); + if (my_r != other_r) { + return my_r < other_r; + + // compare remainder amount + } else { + int my_r = this->remainder(); + int other_r = other.remainder(); + if (my_r != other_r) { + return my_r < other_r; + + // compare variety amount + } else { + int my_v = this->variety(); + int other_v = other.variety(); + if (my_v != other_v) { + return my_v < other_v; + + // both solutions are equal + } else { + return false; + } + } + } + } + + void print(bool shortform=false) { + if (!shortform) { + std::cout << std::endl << "Solution" << std::endl; + for (auto it = this->Rods.begin(); it != this->Rods.end(); ++it) { + int pos = std::distance(this->Rods.begin(), it); + std::cout << "Rod " << pos << ": "; + for (auto c: (*it)->cuts()) { + std::cout << c->length() << " "; + } + std::cout << "(-" << (*it)->remainder() << ")" << std::endl; + } + } + + std::cout << "Rods=" << this->rods(); + std::cout << ", Remainder=" << this->remainder(); + std::cout << ", Variety=" << this->variety(); + std::cout << std::endl; + } + + int remainder() const { + int ret = 0; + for (auto r: this->Rods) { + ret += r->remainder(); + } + return ret; + } + + int rods() const { + return (int) this->Rods.size(); + } + + int variety() const { + int ret = 0; + for (auto r: this->Rods) { + int v = r->variety(); + if (v > 1) ret += v; + } + return ret; + } + +private: + std::vector> Rods; +}; + + +class CutRequest { +public: + CutRequest() {} + + void add(int amount, int length) { + for (int i=0; i < amount; ++i) { + auto c = std::make_shared(length); + this->Cuts.push_back(c); + } + } + + void arrangeCuts() { + auto time_start = std::time(nullptr); + auto solution = CutSolution(); + solution = this->arrangeCutIteration(solution, this->Cuts); + solution.print(); + auto time_end = std::time(nullptr); + std::cout << "Duration: " << (time_end - time_start) << std::endl; + } + + std::vector> cuts() { + return this->Cuts; + } + +private: + std::vector> Cuts; + + CutSolution arrangeCutIteration(CutSolution ¤t_solution, + std::vector> remaining_cuts) { + + if (remaining_cuts.empty()) return current_solution; + CutSolution best_solution; + bool ret_is_defined = false; + + std::vector tested_lengths; + for (int idx_try=0; idx_try < remaining_cuts.size(); ++idx_try) { + auto cut = remaining_cuts.at(idx_try); + + // avaoid testing same length again + // if (std::find(tested_lengths.begin(), tested_lengths.end(), cut->length()) != tested_lengths.end()) continue; + if (intvectcontains(tested_lengths, cut->length())) continue; + tested_lengths.push_back(cut->length()); + + // create temporary solution for trial + CutSolution trysol(current_solution); + + // add cut to temporary solution + trysol.addCut(cut); + + // create list of remaining other cuts + std::vector> remaining_cuts_without_try; + remaining_cuts_without_try.clear(); + for (int idx_other=0; idx_other < remaining_cuts.size(); ++idx_other) { + if (idx_other == idx_try) continue; + + auto cut_other = remaining_cuts.at(idx_other); + remaining_cuts_without_try.push_back(cut_other); + } + + // solve for tried remaining cuts + trysol = this->arrangeCutIteration(trysol, remaining_cuts_without_try); + + // keep best solution + if (!ret_is_defined || trysol.isBetterThan(best_solution)) { + best_solution = trysol; + if (current_solution.rods() == 0) { + std::cout << "Better Solution: "; + best_solution.print(true); + } + ret_is_defined = true; + } + } + + return best_solution; + } + +}; + + +int main(void) { + CutRequest cr; + cr.add(8, 660); + cr.add(16, 620); + cr.add(1, 905); + cr.add(2, 442); + cr.add(2, 848); + cr.add(4, 414); + cr.arrangeCuts(); + +// // manual solve +// CutSolution cs; +// for (auto c: cr.cuts()) { +// cs.addCut(c); +// } +// cs.print(); + + return 0; +}