diff --git a/Codigos/Estruturas de Dados/Ordered Set/ordered_set.cpp b/Codigos/Estruturas de Dados/Ordered Set/ordered_set.cpp index e4f73dae..430d1933 100644 --- a/Codigos/Estruturas de Dados/Ordered Set/ordered_set.cpp +++ b/Codigos/Estruturas de Dados/Ordered Set/ordered_set.cpp @@ -3,4 +3,4 @@ using namespace __gnu_pbds; -typedef tree, rb_tree_tag, tree_order_statistics_node_update> ordered_set; +template typedef tree, rb_tree_tag, tree_order_statistics_node_update> ordered_set; \ No newline at end of file diff --git a/Codigos/Estruturas de Dados/Sparse Table/sparse_table.cpp b/Codigos/Estruturas de Dados/Sparse Table/sparse_table.cpp index af7eee8d..9d875ea7 100644 --- a/Codigos/Estruturas de Dados/Sparse Table/sparse_table.cpp +++ b/Codigos/Estruturas de Dados/Sparse Table/sparse_table.cpp @@ -1,8 +1,8 @@ struct SparseTable { int n, e; - vector st; - SparseTable(vi &v) : n(v.size()), e(floor(log2(n))) { - st.assign(e + 1, vi(n)); + vector> st; + SparseTable(vector &v) : n(v.size()), e(floor(log2(n))) { + st.assign(e + 1, vector(n)); for (int i = 0; i < n; i++) { st[0][i] = v[i]; } for (int i = 1; i <= e; i++) { for (int j = 0; j + (1 << i) <= n; j++) { st[i][j] = min(st[i - 1][j], st[i - 1][j + (1 << (i - 1))]); } diff --git a/Codigos/Grafos/Matching/hungarian.cpp b/Codigos/Grafos/Matching/hungarian.cpp index ca1e1cd2..4d795563 100644 --- a/Codigos/Grafos/Matching/hungarian.cpp +++ b/Codigos/Grafos/Matching/hungarian.cpp @@ -2,12 +2,12 @@ const ll INF = 1e18 + 18; vector> result; -ll hungarian(int n, int m, vector &A) { - vi u(n + 1), v(m + 1), p(m + 1), way(m + 1); +ll hungarian(int n, int m, vector> &A) { + vector u(n + 1), v(m + 1), p(m + 1), way(m + 1); for (int i = 1; i <= n; i++) { p[0] = i; int j0 = 0; - vi minv(m + 1, INF); + vector minv(m + 1, INF); vector used(m + 1, false); do { used[j0] = true;