摘要:
Count Triplets That Can Form Two Arrays of Equal XOR 题意 给定一个数组,求多少个三元对$(i,j,k)$满足$S(i,j-1)=S(j,k)$。 思路 考虑到异或前缀和,很容易想到$O(n3)$的解法,然而远远不够,考虑到$a=b$时$a\opl 阅读全文
摘要:
题目 Now tell you two nonnegative integer \(a\) and \(b\). Find the nonnegative integer \(X\) and integer \(Y\) to satisfy \(X*a + Y*b = 1\). If no such 阅读全文