Codeforces/.common/cpp/skeleton.cpp
Matej Focko 17e43f0ebf
chore(cpp): don't use namespaces in skeleton
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-29 15:57:32 +02:00

118 lines
1.9 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include <algorithm>
#include <array>
#include <bit>
#include <bitset>
#include <cassert>
#include <cctype>
#include <chrono>
#include <cmath>
#include <cstdint>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <optional>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#pragma region helpers
#pragma region math
static constexpr std::int32_t MODULO = 1000000007;
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;
}
#pragma endregion /* math */
#pragma region output
template <typename T, typename U>
std::ostream &operator<<(std::ostream &os, std::pair<T, U> const &p) {
return os << p.first << " " << p.second;
}
template <typename T>
inline void answer(const T &ans) {
std::cout << ans << "\n";
}
inline void yes() { std::cout << "YES\n"; }
inline void no() { std::cout << "NO\n"; }
inline void yesno(bool ans) { std::cout << (ans ? "YES" : "NO") << "\n"; }
#pragma region input
template <typename T>
std::vector<T> load_vector(std::size_t size) {
std::vector<T> result{};
for (auto i = 0u; i < size; ++i) {
T x;
std::cin >> x;
result.push_back(std::move(x));
}
return result;
}
#pragma endregion /* input */
#define LOOP(var, n) for (auto var = 0; var < n; ++var)
#pragma endregion /* helpers */
// for N test cases, uncomment for single test case
// #define SINGLE
namespace solution {
using namespace std;
void solve() {
// TODO
}
} // namespace solution
using namespace solution;
#ifdef TEST
#include "../.common/cpp/catch_amalgamated.hpp"
TEST_CASE("examples") {
// TODO
}
#else
int main(void) {
#ifdef SINGLE
solution::solve();
#else
// for multiple test cases
int N;
std::cin >> N >> std::ws;
for (auto i = 0; i < N; ++i) {
solution::solve();
}
#endif
return 0;
}
#endif