位运算

2017 ICPC Xian Xor

题意:给出一棵树,$n≤5e4 $, $ \left(q≤5e4 \right)$次询问,每次询问三元组$ \left(u,v,k \right) $,返回从$ u $,到$v$ 上序号$ \left(from \ 0 \right)$为$ k$的倍数的点权连续异或。 (更多…)

luoyayu
图论

HDU 6023 ping ping ping

Time Limit: 2000/1000 MS (Java/Others) LCA + 贪心 The structure of the computer room in Northeastern University is pretty miraculous. There are $ n$ servers, some servers connect to the gateway whose $ IP$ address is $ 0$ directly. All servers are connected with each other by $ n$ netting twines. It is said that this structure is favorable for maintaining physical problem of servers. (更多…)

luoyayu
图论

HDU 6121 Build a tree

Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)

Problem Description

HazelFan wants to build a rooted tree. The tree has $ n$ nodes labeled $ 0$ to $ n−1$, and the father of the node labeled $ i$ is the node labeled$ \lfloor\frac{i-1}{k}\rfloor$. HazelFan wonders the size of every subtree, and you just need to tell him the $ XOR$ value of these answers. (更多…)

luoyayu