Hardwood Species Time Limit: 10000MS Memory Limit: 65536K Total Submissions: 21845 Accepted: 8551 Description Hardwoods are the botanical group of trees that have broad leaves, produce a fruit or nut, and generally go dormant in the winter. America's…
异或关于前缀的特性:[u,v]=[1,u]^[1,v] 注意是路径,假设1为根,prexor[1]不保留数值 /*H E A D*/ int to[maxn<<1],nxt[maxn<<1],cost[maxn<<1],head[maxn],tot; int prexor[maxn<<1]; void add(int u,int v,int w){ to[tot]=v;cost[tot]=w;nxt[tot]=head[u];head[u]=tot++; s…
一. 题目 487-3279 Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 274040 Accepted: 48891 Description Businesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or…
题目链接:http://poj.org/problem?id=3764 Time Limit: 2000MS Memory Limit: 65536K Description In an edge-weighted tree, the xor-length of a path p is defined as the xor sum of the weights of edges on p: $_{xor}length(p) = \bigoplus_{e \in p}w(e)$ $\oplus$…
The xor-longest Path Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 6455 Accepted: 1392 Description In an edge-weighted tree, the xor-length of a path p is defined as the xor sum of the weights of edges on p: {xor}length(p)=\oplus{e \in p…