摘要: XorFor given multisets AandB, find minimum non-negative xwhichA⊕x=B.Note that for A={a1,a2,…,an},A⊕x={a1⊕x,a2⊕x,…,an⊕x}.⊕stands for exclusive-or.InputThe first line contains a integer n, which denotes the size of set A(also for B).The second line contains nintegersa1,a2,…,an, which denote the set A. 阅读全文
posted @ 2013-02-07 21:00 剑不飞 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Square freeTest whether nis square free. nis square free if and only if for all p>1,p2is not divisors of n.InputThe first line contains an integer t, the number of test cases.The following nlines, each contains an integer n.(1≤t≤102,1≤n≤1018)OutputPrint "Yes" if nis square free, or &quo 阅读全文
posted @ 2013-02-07 20:14 剑不飞 阅读(201) 评论(0) 推荐(0) 编辑