From 65cc4225c4d72c0b21c207e3ce4be609eae500f5 Mon Sep 17 00:00:00 2001 From: Ariel Date: Mon, 15 Jan 2024 16:40:44 +0800 Subject: [PATCH] Update include.hh --- include.hh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include.hh b/include.hh index 7773e44..e84c877 100644 --- a/include.hh +++ b/include.hh @@ -1,6 +1,8 @@ #include using namespace std; +#define __NARGS(...) std::tuple_size::value + using ll = int64_t; using ull = uint64_t; using pii = pair; @@ -38,8 +40,11 @@ struct igt { } }; -#define read(x, type) type x; cin >> x; -#define readvec(a, n, type) vector a(n); for (int i = 0; i < (n); ++i) cin >> a[i]; +#define untie ios_base::sync_with_stdio(0), cin.tie(NULL) +template void __read(T& x) { cin >> x; } +template void __read(T& x, U&... args) { cin >> x; __read(args...); } +#define read(type, ...) type __VA_ARGS__; __read(__VA_ARGS__); +#define readvec(type, a, n) vector a(n); for (int i = 0; i < (n); ++i) cin >> a[i]; #define putvec(a) for (auto&& x : a) cout << x << ' '; cout << endl; #define debug(x) cerr << #x" = " << x << endl; #define debugvec(a) cerr << #a" = "; for (auto&& x : a) cerr << x << ' '; cerr << endl;