Advertisement
Guest User

elvengard template

a guest
Nov 16th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.07 KB | None | 0 0
  1.  
  2. /***********************بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيم************************************/
  3.  
  4. #include<bits/stdc++.h>
  5. using namespace std;
  6.  
  7. /******** A.R.M.Al.Hasib - elvengard *************/
  8.  
  9. #define     ins              insert
  10. #define     pub              push_back
  11. #define     pob              pop_back
  12. #define     ll               long long int
  13. #define     ull              unsigned long long int
  14. #define     max3(a,b,c)      max(a,max(b,c))
  15. #define     max4(a,b,c,d)    max(max3(a,b,c),d)
  16. #define     min3(a,b,c)      min(a,min(b,c))
  17. #define     min4(a,b,c,d)    min(a,min3(b,c,d))
  18. #define     MOD              1000000007
  19. #define     MAX              1000000000000014
  20. #define     MIN              -100000000000014
  21. #define     EPS              1e-8
  22. #define     PI               (2*acos(0.0))
  23. #define     all(v)           v.begin(),v.end()
  24. #define     mii              map<int,int>
  25. #define     mll              map<ll,ll>
  26. #define     pii              pair<int,int>
  27. #define     pll              pair<ll,ll>
  28. #define     mpii             map<pii,int>
  29. #define     mpll             map<pll,ll>
  30. #define     vi               vector<int>
  31. #define     vl               vector<ll>
  32. #define     vpi              vector<pii>
  33. #define     vpl              vector<pll>
  34. #define     si               set<int>
  35. #define     sl               set<ll>
  36. #define     siit             set<int>::iterator
  37. #define     slit             set<long long>::iterator
  38. #define     msi              multiset<int>
  39. #define     msl              multiset<ll>
  40. #define     msiit            multiset<int>::iterator
  41. #define     mslit            multiset<long long>::iterator
  42. #define     frsit(it,myset)  for (it=myset.begin(); it!=myset.end(); ++it)
  43. ///                          use *it as the loop variable for set iteration..
  44. #define     fast             ios_base::sync_with_stdio(0);cin.tie(0)
  45. #define     F                first
  46. #define     S                second
  47. #define     mem(a,v)         memset(a,v,sizeof(a))
  48. #define     mp               make_pair
  49. #define     sq(x)           (x)*(x)
  50. #define     dis(x1, y1, x2, y2) sqrt(sq(x1-x2)+sq(y1-y2))
  51. #define     foi              freopen("input.txt","r",stdin);
  52. #define     foo              freopen("output.txt","w",stdout);
  53. #define     check            printf("check")
  54. #define     nl               printf("\n")
  55. #define     left(x)          ((x) << 1)
  56. #define     right(x)         (((x) << 1) + 1)
  57. #define     dbg(x)           cout << #x << " = " << x << endl
  58. #define     gcd(a,b)         __gcd(a,b)
  59. #define     lcm(a,b)         a*b/gcd(a,b)
  60. #define     fri(i,n)         for(int i=0;i<n;i++)
  61. #define     frl(i,n)         for(ll i=0;i<n;i++)
  62. #define     frir(i,n)        for(int i=n-1;i>=0;i++)
  63. #define     frlr(i,n)        for(ll i=n-1;i>=0;i++)
  64. #define     wh(n)            while(n--)
  65. #define     fxd(i,x)         std::fixed <<std::setprecision(i)<<(x)
  66. #define     onesi(n)         __builtin_popcount(n)
  67. #define     onesll(n)        __builtin_popcountll(n)
  68.  
  69. int dx[] = {-1, -1, -1, 0, 0, 1, 1, 1};
  70. int dy[] = {-1, 0, 1, -1, 1, -1, 0, 1};
  71.  
  72. #define bug printf("debug\n");
  73. #define br puts("");
  74.  
  75. template<typename t>
  76. t abs(t a)
  77. {
  78.     if(a>=0)
  79.         return a;
  80.     return -a;
  81. }
  82. //error
  83. #define error(args...) { vector<string> _v = split(#args, ','); err(_v.begin(), args); puts(""); }
  84.  
  85. vector<string> split(const string& s, char c)
  86. {
  87.     vector<string> v;
  88.     stringstream ss(s);
  89.     string x;
  90.     while (getline(ss, x, c))
  91.         v.emplace_back(x);
  92.     return move(v);
  93. }
  94.  
  95. void err(vector<string>::iterator it) {}
  96. template<typename T, typename... Args>
  97. void err(vector<string>::iterator it, T a, Args... args)
  98. {
  99.     cerr << it -> substr((*it)[0] == ' ', it -> length()) << " = " << a << "  ";
  100.     err(++it, args...);
  101. }
  102. //end
  103.  
  104. /************************ End *************************/
  105.  
  106.  
  107.  
  108. int main(){
  109.     fast;
  110.  
  111.     return 0;
  112. }
  113.  
  114. /**************************الحمد لله************************************/
  115.  
  116. /**A.R.M. AL HASIB**/
  117. /**Computer Science & Engineering**/
  118. /**University of Barisal, Bangladesh**/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement