Code LockTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 2006 Accepted Submission(s): 766 Problem DescriptionA lock you use has a code system to be opened instead of a key. The lock contains a seq…
题意: 对于n个数a[0]~a[n-1],但你不知道它们的值,通过逐步提供给你的信息,你的任务是根据这些信息回答问题: I P V :告诉你a[P] = V I P Q V:告诉你a[P] XOR a[Q] = V Q K P1..PK:询问a[P1]^a[P2]^...a[PK]的值 n<=20000 题解: 首先看前两个操作: 第一个操作我们可以新加一个节点a[n]=0,则a[p]=val转化为a[p]^a[n]=val. 那么所有知道值的点必定都与a[n]在同一个并查集之内. 我们…
Problem Description A lock you use has a code system to be opened instead of a key. The lock contains a sequence of wheels. Each wheel has the 26 letters of the English alphabet 'a' through 'z', in order. If you move a wheel up, the letter it shows c…