总元素个数不超过K
constexpr int K = 100000;struct L{ int v; L *nxt, *prv;} dt[K], *mem[K]; int mc;void init() { for(int i = 1; i <= K; i++) mem[i] = &dt[i]; }L *lalloc() { return mc < K - 1 ? mem[--mc] : nullptr; }void lfree(L *&l) { mem[mc++] = l, l = nullptr; }