Advertisement
Merevoli

Untitled

Mar 30th, 2022
735
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<iostream>
  2. using namespace std;
  3. void __print(int x) {cerr << x;}
  4. void __print(long x) {cerr << x;}
  5. void __print(long long x) {cerr << x;}
  6. void __print(unsigned x) {cerr << x;}
  7. void __print(unsigned long x) {cerr << x;}
  8. void __print(unsigned long long x) {cerr << x;}
  9. void __print(float x) {cerr << x;}
  10. void __print(double x) {cerr << x;}
  11. void __print(long double x) {cerr << x;}
  12. void __print(char x) {cerr << '\'' << x << '\'';}
  13. void __print(const char *x) {cerr << '\"' << x << '\"';}
  14. void __print(const string &x) {cerr << '\"' << x << '\"';}
  15. void __print(bool x) {cerr << (x ? "true" : "false");}
  16.  
  17. template<typename T, typename V>
  18. void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ", "; __print(x.second); cerr << '}';}
  19. template<typename T>
  20. void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? ", " : ""), __print(i); cerr << "}";}
  21. void _print() {cerr << "]"<<endl;}
  22. template <typename T, typename... V>
  23. void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
  24. #define debug(x...) cerr << "[#" << __LINE__ << "](" << #x << ") = ["; _print(x)
  25. template<typename T,typename T1>T amax(T &a,T1 b){if(b>a)a=b;return a;}
  26. template<typename T,typename T1>T amin(T &a,T1 b){if(b<a)a=b;return a;}
  27.  
Advertisement
RAW Paste Data Copied
Advertisement