Skip to content

Instantly share code, notes, and snippets.

View BenjaminBLi's full-sized avatar
🎯
Focusing

Ben BenjaminBLi

🎯
Focusing
View GitHub Profile
@BenjaminBLi
BenjaminBLi / segtree.cpp
Created January 30, 2018 19:08
Segment tree code (incomplete)
#include <bits/stdc++.h>
#define fori(i, st, en) for(int i = st; i < (int) (en); i++)
#define rfori(i, st, en) for(int i = st; i >= (int) (en); i--)
#define f first
#define s second
#define pb push_back
#define left(i) (i<<1)
#define right(i) (i<<1|1)
#define mid(l, r) ((l+r)>>1)
using namespace std;