子集选取

#include<cstdio>
using namespace std;
typedef long long LL;
LL n , k , p = 1e9 + 7;

inline LL fpow(LL x , LL y)
{
	LL res = 1;
	while (y)
	{
		if (y & 1) res = res * x % p;
		x = x * x % p , y >>= 1;
	}
	return res;
}

int main()
{
	freopen("subset.in" , "r" , stdin);
	freopen("subset.out" , "w" , stdout);
	scanf("%lld%lld" , &n , &k);
	printf("%lld" , fpow(2 , n * k % (p - 1)));
	fclose(stdin) , fclose(stdout);
}
posted @ 2020-02-20 19:38  leiyuanze  阅读(174)  评论(0编辑  收藏  举报