摘要:
我太菜了没完赛…… 第一次CF就这么飞机了…… ========== User : ChrisSail Rank: 2543 A: 150 B~F: 0 ========== 所以只记了两题在这里。 A. Points on the line tag : 枚举,暴力 We've got no tes 阅读全文
摘要:
```cpp include include define MAXN 1000005 using namespace std; //换底公式 loga(b) = logc(b) / logc(a) int F[20][MAXN]; int log[MAXN]; int N,M; int main() 阅读全文
摘要:
#include <iostream> #define MAXN 500005 #define lowbit(x) (x&(-x)) using namespace std; int pre[MAXN]; int N,M; inline int get_sum(int x) { int ans = 阅读全文
摘要:
树的重心 cpp include const int N=1000010; const int inf=0x7f7f7f7f; using namespace std; int f[N],size[N],n,head[N],tot; int rt,sum; struct Edge{int u,v,n 阅读全文
摘要:
代码 树的直径 cpp //solution dp include define N 10010 using namespace std; struct Edge{ int u,v,next,w; }G[N 2]; int tot=0,head[4 N],dp1[N],dp2[N]; //dp1[u 阅读全文
摘要:
```cpp include include include include using namespace std; int n,m,Q; int head[100005],p; struct edge{int to,next,w;}e[200005]; void addedge(int u,in 阅读全文
摘要:
"洛谷 线段树1模板" cpp //入门代码 include typedef long long ll; using namespace std; ll a[100005]; ll Seg[400005]={0},add[400005]={0}; int N,M; inline void PushU 阅读全文