时间限制:C/C++/Rust/Pascal 5秒,其他语言10秒
            空间限制:C/C++/Rust/Pascal 512 M,其他语言1024 M
             64bit IO Format: %lld
        
     
    题目描述
        
        
    
            
              Mr. W have a sequence A with length N.  
    Set 
      Mr.W makes Q queries. For each query he wants to know the size of S(L,R) for given L, R. 
   L, R will not be given directly. He will give you L' and R'. 
     
 means XOR. 
    Lastans donates the answer of last query. It's zero at the beginning. 
 
                            输入描述:
                                                    The first line contains one integer
)
.
Next line contains N integers 
)
.
Next line contains one integer 
)
Next Q lines each contains two integers 
)
.
                                                                            输出描述:
                                                    Q lines, the answer of each query.
                                                                            
                        
                            示例1
                        
                        
                            
                                输入
                                复制
                                
                                
                                    5
15 14 13 11 7
3
2 5
2 5
2 5