摘要:
快速排序 我居然现在还不会快排。 第一种写法: c++ // luogu judger enable o2 include using namespace std; const int maxn=1e5+5; int n, a[maxn]; void swap(int &a, int &b){ in 阅读全文
摘要:
Fire (poj 2152 树形dp) 给定一棵n个结点的树(1d[i]$时,$f[i][j]=\infty$。它的思想就是如果i依赖j,就直接让子树中依赖j的点都减去依赖,从而消除影响。 (傻逼了,用rmq求树上两点距离) c++ include include include using na 阅读全文