61 unsigned int t = std::time(0);
66 n = std::stoi(
argv[1]);
69 t = std::stoi(
argv[2]);
78 cout <<
"n must be positive" <<
endl;
84 cout <<
argv[0] <<
" " << n <<
" " << t <<
endl;
91 for (i = n - 1; i >= 0; i--)
101 for (i = 0; i < n; i++)
112 for (i = n - 1; i >= 0; i--)
115 ptr =
new Foo (value);
123 for (i = 0; i < n; i++)
132 for (i = n - 1; i >= 0; i--)
135 ptr =
new Foo (value);
143 for (i = 0; i < n/2; i++)
151 for (i = n - 1; i >= 0; i--)
154 ptr =
new Foo (value);
161 for (i = 0; i < n + n/2; i++)
Core header for the Aleph-w library.
Node * getMin()
Elimina del heap el nodo de menor prioridad.
Node * insert(Node *p) noexcept
Inserta un nodo en un heap.
Main namespace for Aleph-w library functions.
Divide_Conquer_DP_Result< Cost > divide_and_conquer_partition_dp(const size_t groups, const size_t n, Transition_Cost_Fn transition_cost, const Cost inf=dp_optimization_detail::default_inf< Cost >())
Optimize partition DP using divide-and-conquer optimization.
Node heap without virtual destructor.
bool operator<(const Foo &r)
bool operator<=(const Foo &r)
Binary heap implementation using tree structure.
Utility functions for binary tree operations.