mirror of
https://gitlab.com/mfocko/Codeforces.git
synced 2024-12-22 11:51:24 +01:00
chore(cpp): introduce aliases
Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
parent
e39ed7a5c0
commit
c8035c22dc
1 changed files with 25 additions and 2 deletions
|
@ -22,6 +22,31 @@
|
||||||
|
|
||||||
#pragma region helpers
|
#pragma region helpers
|
||||||
|
|
||||||
|
#pragma region aliases
|
||||||
|
#define LOOP(var, n) for (auto var = 0; var < n; ++var)
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
using V = std::vector<T>;
|
||||||
|
|
||||||
|
template <typename K, typename V>
|
||||||
|
using M = std::map<K, V>;
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
using S = std::set<T>;
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
using Q = std::deque<T>;
|
||||||
|
|
||||||
|
using i8 = std::int8_t;
|
||||||
|
using u8 = std::uint8_t;
|
||||||
|
using i16 = std::int16_t;
|
||||||
|
using u16 = std::uint16_t;
|
||||||
|
using i32 = std::int32_t;
|
||||||
|
using u32 = std::uint32_t;
|
||||||
|
using i64 = std::int64_t;
|
||||||
|
using u64 = std::uint64_t;
|
||||||
|
#pragma endregion /* aliases */
|
||||||
|
|
||||||
#pragma region debug
|
#pragma region debug
|
||||||
void dbg_out() { std::cerr << std::endl; }
|
void dbg_out() { std::cerr << std::endl; }
|
||||||
template <typename Head, typename... Tail>
|
template <typename Head, typename... Tail>
|
||||||
|
@ -113,8 +138,6 @@ inline void no() { std::cout << "NO\n"; }
|
||||||
inline void yesno(bool ans) { std::cout << (ans ? "YES" : "NO") << "\n"; }
|
inline void yesno(bool ans) { std::cout << (ans ? "YES" : "NO") << "\n"; }
|
||||||
#pragma endregion /* output */
|
#pragma endregion /* output */
|
||||||
|
|
||||||
#define LOOP(var, n) for (auto var = 0; var < n; ++var)
|
|
||||||
|
|
||||||
#pragma endregion /* helpers */
|
#pragma endregion /* helpers */
|
||||||
|
|
||||||
// for ‹N› test cases, uncomment for single test case
|
// for ‹N› test cases, uncomment for single test case
|
||||||
|
|
Loading…
Reference in a new issue