Skip to content
Snippets Groups Projects
Select Git revision
  • f6bb29e8f8375ff943760e611bc6d186727d2cc0
  • develop default
  • 102-Utest
  • 96-method_i
  • 89-str_to_array
  • 91-output
  • master
  • 87-method-d-swallowed-obstacles
  • feature_trajectory_correction
  • Issue_63
  • Issue_61
  • refactor_SteadyState
  • v0.8.3
  • v0.8.2
  • v0.8.1
  • v0.8
  • v0.7
  • v0.6
18 results

plot_voronoi.py

Blame
  • hanoi.cc 409 B
    #include <iostream>
    #include <string>
    
    auto the_other(int i, int j) -> int { return 3 - i - j; }
    
    void transfer(unsigned long n, int from, int to)
    {
        int oth = the_other(from, to);
        if (n > 1)
            transfer(n - 1, from, oth);
        std::cout << n << ": " << from << "->" << to << "\n";
        if (n > 1)
            transfer(n - 1, oth, to);
    }
    
    auto main() -> int
    {
        size_t N = 6;
        transfer(N, 0, 1);
    }