定义集合xor操作 A xor B=A∪B-A∩B。
问有多少对(P,Q)满足 P∈A Q∈B 使得 (P xor A)xor(Q xor B)=A xor B其中P Q都是集合。
答案对1e9+7取模。
例如:A ={1} ,B={1,2},A xor B = {2},枚举所有情况P Q有2种。
Input
三个整数A B C。(A,B,C<=10^18) 表示|A|,|B|,|A∩B|。
Output
输出答案对10^9+7取模的值
Input示例
1 2 1
Output示例
2
题解:结合食用更佳。
orz。。。
代码:
#include<bits/stdc++.h>
using namespace std;
long long n1,m,n,t,ans;
int main(){
scanf("%lld%lld%lld",&n1,&m,&n);
ans=1;t=2;
while(n){
if(n%2)ans=(ans*t)%1000000007;
t=(t*t)%1000000007;
n/=2;
}
printf("%lld",ans);
}