From 24aae69f756f7f2603b73c8a52d663d748ae6bfc Mon Sep 17 00:00:00 2001 From: Ariel Date: Fri, 19 Jan 2024 17:21:51 +0800 Subject: [PATCH] Update include.hh --- include.hh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include.hh b/include.hh index 671eb55..c1be2d2 100644 --- a/include.hh +++ b/include.hh @@ -88,8 +88,12 @@ template void __read(T& x, U&... args) { cin >> x; __ #define read(type, ...) __AS_PROCEDURE(type __VA_ARGS__; __read(__VA_ARGS__);) #define readvec(type, a, n) __AS_PROCEDURE(vector a(n); for (int i = 0; i < (n); ++i) cin >> a[i];) #define putvec(a) __AS_PROCEDURE(for (auto&& x : a) cout << x << ' '; cout << endl;) -#define debug(x) __AS_PROCEDURE(cerr << #x" = " << x << endl;) +#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, vector vec) { + for (auto&& i : vec) out << i << ' '; + return out; +} /* pops */ #define poptop(q, ...) __AS_PROCEDURE(auto [__VA_ARGS__] = q.top(); q.pop();)