#include #define WHATEVER 1000000007 unsigned long long pw(unsigned int n){ unsigned long long r = 1; for(unsigned int i=0; i>a>>b>>k>>c; if(c != a && c != b){ std::cout << 0; return 0; } /*if(a == b){ std::cout << k; return 0; }*/ unsigned long long res = pw(k); std::cout << (res); }