chore(cpp): improve skeleton

* add power
* add ‹using namespace std›

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2023-07-10 11:39:30 +02:00
parent f4d67c60f0
commit c2192f52e7
Signed by: mfocko
GPG key ID: 7C47D46246790496

View file

@ -2,6 +2,17 @@
namespace { 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() { void solve() {
// TODO // TODO
} }