Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef LOCAL
- #pragma GCC optimize("O3")
- #endif
- #include <bits/stdc++.h>
- using namespace std;
- #define R22(r) template <class c> typename enable_if<sizeof(dud<c>(0)) r,muu&>::type operator<<(c g)
- template <class c> struct rge {c b, e;};
- template <class c> rge<c> range(c i, c j) {return rge<c>{i, j};}
- template <class c> auto dud(c*r)->decltype(cerr << *r);
- template <class c> char dud(...);
- struct muu {
- #ifdef LOCAL
- stringstream a;
- ~muu() {cerr << a.str() << endl;}
- R22(>=2) {a << boolalpha << g; return *this;}
- R22(==1) {return *this << range(begin(g), end(g));}
- template <class c > muu & operator<<( rge<c> u) {
- a << "[";
- for (c i = u.b; i != u.e; ++i)
- *this << ", " + 2 * (i == u.b) << *i;
- return *this << "]";
- }
- template <class c, class m > muu & operator<<( pair <m,c> r) {return *this << "(" << r.first << ", " << r.second << ")";}
- #else
- template <class c > muu & operator<<( const c&){return *this;}
- #endif
- muu & operator()(){return *this;}
- };
- #define imie(r) "[" #r ": " << (r) << "] "
- #define debug (muu() << __FUNCTION__ << "#" << __LINE__ << ": ")
- template<typename T, typename S> pair<T, S> operator+(pair<T,S> a, pair<T,S>b) {return {a.first+b.first, a.second+b.second};}
- using ll = long long;
- using ull = unsigned long long;
- using ld = long double;
- using pld = pair<ld, ld>;
- using pii = pair<int, int>;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement