diff --git a/.common/cpp/skeleton.cpp b/.common/cpp/skeleton.cpp index efcfe86..6f4ee9e 100644 --- a/.common/cpp/skeleton.cpp +++ b/.common/cpp/skeleton.cpp @@ -2,6 +2,17 @@ namespace { +using namespace std; + +long pow(long base, long exp) { + if (exp == 0) + return 1; + long half = pow(base, exp / 2); + if (exp % 2 == 0) + return half * half; + return half * half * base; +} + void solve() { // TODO }