{{ message }}

Instantly share code, notes, and snippets.

# Hiroaki Y.min-25

Last active May 25, 2018
View find_recurrence_relation.cpp
 #include #include #include using namespace std; using i64 = long long; int mod_inv(int a, int mod) {
Last active Sep 26, 2019
View count_lattice_points.cpp
 #include #include #include #include #include using namespace std; using i64 = int64_t;
Last active Jun 30, 2019
View maximum_matching_sqrtn_m.cpp
 #include #include #include using namespace std; class MaximumMatching { /* Maximum Cardinality Matching in General Graphs.
Last active Feb 16, 2018
View maximum_weighted_matching_nmlogn.cpp
 #include #include #include #include #include using namespace std;
Last active Apr 30, 2020
View binomial_mod_pe_fast.py
 def binomial_mod_pe_fast(n, m, p, e): def mod_inv(a, p): b = p s, t = 1, 0 while b: a, (q, b) = b, divmod(a, b) s, t = t, s - t * q if a != 1: raise ValueError("gcd(a, mod) should be 1.") return s if s >= 0 else s + p
Last active Sep 8, 2017
View cost_scaling.cpp
 #include #include #include #include using namespace std; template < typename CapType, typename TotalCapType,
Last active Sep 18, 2017
View maximum_flow_dinic_pr.cpp
 #include #include #include #include #include #include #include using namespace std;
Last active Feb 28, 2018
View cost_scaling_lemon.cpp
 #include #include #include #include #include using i64 = long long; using namespace std; using namespace lemon;
Last active Feb 1, 2018
View maximum_matching_gabow.cpp
 #include #include #include // main function #include #include #include using namespace std;
You can’t perform that action at this time.