mirror of
https://gitlab.com/mfocko/Codeforces.git
synced 2024-11-09 13:49:06 +01:00
chore(cpp): improve skeleton
* add power * add ‹using namespace std› Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
f4d67c60f0
commit
c2192f52e7
1 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue