#先看源码 def walk(top, topdown=True, onerror=None, followlinks=False): """Directory tree generator. For each directory in the directory tree rooted at top (including top itself, but excluding '.' and '..'), yields a 3-tuple dirpath, dirnames,
D. Zip-line 题目连接: http://www.codeforces.com/contest/650/problem/D Description Vasya has decided to build a zip-line on trees of a nearby forest. He wants the line to be as long as possible but he doesn't remember exactly the heights of all trees in t
题链: https://www.luogu.org/problemnew/show/P3168题解: 主席树 强制在线? 那就直接对每一个前缀时间建一个线段树(可持久化线段树),线段树维护优先度权值. 代码: #include<bits/stdc++.h> #define MAXN 100005 using namespace std; int tmp[MAXN]; int N,M,tnt; long long pre=1; struct Event{ int ent; int p[MAXN*