mirror of
https://gitlab.com/mfocko/Codeforces.git
synced 2024-11-12 23:20:29 +01:00
chore(cpp): update skeleton
Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
2ef0fc35e0
commit
fddc548fbb
1 changed files with 25 additions and 13 deletions
|
@ -1,18 +1,28 @@
|
|||
#include <iostream>
|
||||
|
||||
namespace {
|
||||
namespace helpers {
|
||||
|
||||
using namespace std;
|
||||
|
||||
long pow(long base, long exp) {
|
||||
if (exp == 0)
|
||||
return 1;
|
||||
if (exp == 0) return 1;
|
||||
long half = pow(base, exp / 2);
|
||||
if (exp % 2 == 0)
|
||||
return half * half;
|
||||
if (exp % 2 == 0) return half * half;
|
||||
return half * half * base;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline void answer(const T &ans) {
|
||||
cout << ans << "\n";
|
||||
}
|
||||
|
||||
} // namespace helpers
|
||||
|
||||
namespace {
|
||||
|
||||
using namespace std;
|
||||
using namespace helpers;
|
||||
|
||||
void solve() {
|
||||
// TODO
|
||||
}
|
||||
|
@ -22,7 +32,15 @@ void solve() {
|
|||
// for single test case, comment out for ‹N› test cases
|
||||
#define SINGLE
|
||||
|
||||
#ifndef TEST
|
||||
#ifdef TEST
|
||||
|
||||
#include "../.common/cpp/catch_amalgamated.hpp"
|
||||
|
||||
TEST_CASE("examples") {
|
||||
// TODO
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int main(void) {
|
||||
|
||||
|
@ -45,10 +63,4 @@ int main(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include "../.common/cpp/catch_amalgamated.hpp"
|
||||
|
||||
// TODO
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue