摘要:
int RMQ(int L,int R){ int k=0; while((1<<(k+1))<=R-L+1) ++k; return max(f[L][K],f[R-(1<<k)+1][K]); } 阅读全文
摘要:
#include using namespace std; const int MAX_N = 100; const int MAX_M = 10000; struct edge{ int v,next; }e[MAX_N]; int p[MAX_N],eid; int init(){ memset(p,-1,sizeof(p)); eid = 0; } void insert(int ... 阅读全文