From e32b126f669ddd773581c35c75760e8ebcc5ca93 Mon Sep 17 00:00:00 2001 From: subcrip Date: Mon, 13 May 2024 11:46:57 +0800 Subject: [PATCH] Update include.hh Signed-off-by: subcrip --- include.hh | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/include.hh b/include.hh index db71952..f0e6f33 100644 --- a/include.hh +++ b/include.hh @@ -206,7 +206,9 @@ template void __read(T& x, U&... args) { cin >> x; __ #define readvec(type, a, n) __AS_PROCEDURE(vector a(n); copy_n(ii(cin), (n), a.begin());) #define readvec1(type, a, n) __AS_PROCEDURE(vector a((n) + 1); copy_n(ii(cin), (n), a.begin() + 1);) #define putvec(a) __AS_PROCEDURE(copy(a.begin(), a.end(), oi<__as_typeof(a)::value_type>(cout, " ")); cout << endl;) +#define putvec1(a) __AS_PROCEDURE(copy(a.begin() + 1, a.end(), oi<__as_typeof(a)::value_type>(cout, " ")); cout << endl;) #define putvec_eol(a) __AS_PROCEDURE(copy(a.begin(), a.end(), oi<__as_typeof(a)::value_type>(cout, "\n"));) +#define putvec1_eol(a) __AS_PROCEDURE(copy(a.begin() + 1, a.end(), oi<__as_typeof(a)::value_type>(cout, "\n"));) #define debug(x) __AS_PROCEDURE(cerr << #x" = " << (x) << endl;) #define debugvec(a) __AS_PROCEDURE(cerr << #a" = "; for (auto&& x : a) cerr << x << ' '; cerr << endl;) template ostream& operator<<(ostream& out, const pair& p) { @@ -395,3 +397,41 @@ template void sort_by_key(R std::sort(first, last, [&] (auto&& a, auto&& b) { return comp(extractor(a), extractor(b)); }); } ///////////////////////////////////////////////////////// + +#define SINGLE_TEST_CASE +// #define DUMP_TEST_CASE 7219 + +void dump() {} + +void dump_ignore() {} + +void prep() {} + +void solve() { +} + +int main() { +#if __cplusplus < 201703L || defined(_MSC_VER) && !defined(__clang__) + assert(false && "incompatible compiler variant detected."); +#endif + untie, cout.tie(NULL); + prep(); +#ifdef SINGLE_TEST_CASE + solve(); +#else + read(int, t); + for (int i = 0; i < t; ++i) { +#ifdef DUMP_TEST_CASE + if (t < (DUMP_TEST_CASE)) { + solve(); + } else if (i + 1 == (DUMP_TEST_CASE)) { + dump(); + } else { + dump_ignore(); + } +#else + solve(); +#endif + } +#endif +}