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;