Skip to content

Instantly share code, notes, and snippets.

Hiroaki Y. min-25

Block or report user

Report or block min-25

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View characteristic_polynomial_mod_m.cpp
#include <cstdio>
#include <cassert>
#include <algorithm>
#include <vector>
using namespace std;
using i64 = long long;
using Matrix = vector< vector<int> >;
View find_linear_recurrence_mod.cpp
#include <cstdio>
#include <cassert>
#include <algorithm>
#include <vector>
#include <random>
using namespace std;
using i64 = long long;
View find_recurrence_relation.cpp
#include <cstdio>
#include <cassert>
#include <vector>
using namespace std;
using i64 = long long;
int mod_inv(int a, int mod) {
View count_lattice_points.cpp
#include <cstdio>
#include <cmath>
#include <utility>
#include <stack>
#include <functional>
using namespace std;
using i64 = int64_t;
View maximum_matching_sqrtn_m.cpp
#include <cstdio>
#include <cassert>
#include <vector>
using namespace std;
class MaximumMatching {
/*
Maximum Cardinality Matching in General Graphs.
View maximum_weighted_matching_nmlogn.cpp
#include <cstdio>
#include <cassert>
#include <vector>
#include <queue>
#include <random>
using namespace std;
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
View signed_wavelet_matrix_3d.cpp
#include <cstdio>
#include <cassert>
#include <algorithm>
#include <vector>
#include <functional>
#include <tuple>
using namespace std;
class SignedWaveletMatrix3D {
View wavelet_matrix_3d_simple.cpp
#include <cstdio>
#include <algorithm>
#include <vector>
#include <tuple>
using namespace std;
class WaveletMatrix3D {
View wavelet_matrix_3d_compact.cpp
#include <cstdio>
#include <cassert>
#include <algorithm>
#include <vector>
#include <tuple>
using namespace std;
class WaveletMatrix3D {
You can’t perform that action at this time.