Skip to content

Instantly share code, notes, and snippets.

View abhiy13's full-sized avatar
👾

Abhi abhiy13

👾
View GitHub Profile
@algmyr
algmyr / test.sh
Created October 23, 2018 21:14
Simple hackable test script
#!/bin/bash
mode="$1"
if [[ "$mode" == "perf" ]]; then
cmd="$2"
i=0
while true
do
echo "Test $((i+=1))"
python gen.py > gendata
@Chillee
Chillee / dinic.cpp
Last active December 8, 2024 16:50
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;