Powers

Codeforces Round 882 (Div. 2) C. Vampiric Powers, anyone?

由题目观察可得,a[m+1]=a[i]^...a[m],,结合异或的性质a^b^a=b,可得如果在末尾添加一个a[m+1],a[m+1]会和末尾几个抵消掉,求得i~k这一段的异或和,k<m,因此通过该操作实际上我就可以求得所有长度连续区间的异或和,求其最大值,n=1e5+10,如果暴力求解肯定会超时 ......
Codeforces Vampiric Powers anyone Round

The Super Powers UVA - 11752

求1~2^64 区间里, 有多少合法数X 合法数: X= a^b ,至少存在2个不同的a #include <iostream> #include <algorithm> #include <vector> using namespace std; const int N =65536+3; int ......
Powers Super 11752 The UVA

Perfect P-th Powers UVA - 10622

给出 n, 写成 n= x^p 的形式,求p最大值 #include <iostream> #include <vector> #include <cmath> #include <algorithm> using namespace std ; #define int long long int ......
Perfect Powers 10622 P-th UVA
共3篇  :1/1页 首页上一页1下一页尾页