Skip to content

Instantly share code, notes, and snippets.

Avatar

Izan Beltran izanbf1803

View GitHub Profile
@Chillee
Chillee / dinic.cpp
Last active Nov 15, 2021
Max Flow (Dinic's, HLPP)
View dinic.cpp
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 Jan 27, 2022
bignum class for C++
View BigInt.cpp
// 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;