diff --git a/Template/CPTemp.cpp b/Template/CPTemp.cpp index 9573055..bc80ca3 100644 --- a/Template/CPTemp.cpp +++ b/Template/CPTemp.cpp @@ -2,8 +2,6 @@ using namespace std; #define FAST_IO (ios_base:: sync_with_stdio(false),cin.tie(NULL)); - -#define int long long #define ll long long #define ull unsigned long long #define endl '\n' @@ -12,11 +10,9 @@ using namespace std; #define pb push_back #define all(x) x.begin(), x.end() #define sz(x) (int)(x).size() - #define yes cout<<"YES"< void _print(pair p); -template void _print(vector v);template void _print(set v); -template void _print(map v);template void _print(multiset v); -template void _print(pair p) {cerr << "{"; _print(p.first); cerr << ","; _print(p.second); cerr << "}";} -template void _print(vector v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";} -template void _print(set v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";} -template void _print(multiset v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";} -template void _print(unordered_set v) {cerr<<"[ "; for(T i : v) {_print(i); cerr<<" ";} cerr<<"]";} -template void _print(map v) {cerr << "[ "; for (auto i : v) {_print(i); cerr << " ";} cerr << "]";} -template void _print(multimap v) {cerr << "[ "; for (auto i : v) {_print(i); cerr << " ";} cerr << "]";} -template void _print(unordered_map v) {cerr << "[ "; for (auto i : v) {_print(i); cerr << " ";} cerr << "]";} +void __print(int x) {cerr << x;}void __print(long x) {cerr << x;} void __print(long long x){cerr << x;} +void __print(unsigned x){cerr << x;} void __print(unsigned long x){cerr << x;} void __print(unsigned long long x){cerr << x;} +void __print(float x){cerr << x;} void __print(double x){cerr << x;} void __print(long double x){cerr << x;} +void __print(char x){cerr << x;} void __print(const char *x){cerr << x;} void __print(const string &x){cerr << x;} +void __print(bool x){cerr << (x ? "true" : "false");} void _print() { cerr << "\n"; } +template void __print(const A &x); template void __print(const pair &p); +template void __print(const A &x) {bool f=1; cerr << '['; for (const auto &i : x) {cerr << (f ? "" : ","), __print(i); f = 0;} cerr << ']';} +template void __print(const pair &p) {cerr << '('; __print(p.first); cerr << ','; __print(p.second); cerr << ')';} +template void _print(const Head &H, const Tail &...T) { __print(H); if (sizeof...(T)) cerr << ", "; _print(T...);} ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void solve() @@ -60,7 +49,7 @@ void solve() } -int32_t main() +signed main() { FAST_IO; int TC = 1;