Skip to content

Instantly share code, notes, and snippets.

View izanbf1803's full-sized avatar

Izan Beltran izanbf1803

View GitHub Profile
@Chillee
Chillee / dinic.cpp
Last active July 14, 2022 02:10
Max Flow (Dinic's, HLPP)
template <int MAXV, class T = int> struct Dinic {
const static bool SCALING = false; // non-scaling = V^2E, Scaling=VElog(U) with higher constant
int lim = 1;
const T INF = numeric_limits<T>::max();
struct edge {
int to, rev;
T cap, flow;
};
int s = MAXV - 2, t = MAXV - 1;
@ar-pa
ar-pa / BigInt.cpp
Last active October 24, 2023 09:30
bignum class for C++
// In the name of Allah.
// We're nothing and you're everything.
// Ya Ali!
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 1e2 + 14, lg = 15;