rofi93

Precode

Dec 2nd, 2014 (edited)
424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.98 KB | None | 0 0
  1. /* -------------------------------- */
  2. /* Name: MD. Khairul Basar          */
  3. /* Institute: HSTU                  */
  4. /* Dept: CSE                        */
  5. /* Email: [email protected] */
  6. /* -------------------------------- */
  7.  
  8. #include <ext/pb_ds/assoc_container.hpp>
  9. #include <ext/pb_ds/tree_policy.hpp>
  10. #include <bits/stdc++.h>
  11. /* all header files */
  12.  
  13. #define fs            first
  14. #define sc            second
  15. #define sp            printf(" ")
  16. #define nl            printf("\n")
  17. #define pb(a)         push_back(a)
  18.  
  19. #define setzero(a)    memset(a,0,sizeof(a))
  20. #define setneg(a)     memset(a,-1,sizeof(a))
  21. #define setinf(a)     memset(a,126,sizeof(a))
  22.  
  23. #define tc1(x)        printf("Case %d: ",x)
  24. #define tc2(x)        printf("Case #%d: ",x)
  25. #define tc3(x)        printf("Case %d:\n",x)
  26. #define tc4(x)        printf("Case #%d:\n",x)
  27.  
  28. #define iin(x)        scanf("%d",&x)
  29. #define din(x)        scanf("%lf",&x)
  30. #define lin(x)        scanf("%lld",&x)
  31. #define clin(x)       scanf("%I64d",&x)
  32.  
  33. #define pr1(x)        cout<<x<<"\n"
  34. #define pr2(x,y)      cout<<x<<" "<<y<<"\n"
  35. #define pr3(x,y,z)    cout<<x<<" "<<y<<" "<<z<<"\n"
  36. #define pr4(w,x,y,z)  cout<<w<<" "<<x<<" "<<y<<" "<<z<<"\n"
  37. #define fast          ios::sync_with_stdio(0)
  38. #define read          freopen("input.txt","r",stdin)
  39. #define write         freopen("output.txt","w",stdout)
  40. #define prflag1(flag) printf("%s\n",(flag)?"YES":"NO")
  41. #define prflag2(flag) printf("%s\n",(flag)?"Yes":"No")
  42. #define prflag3(flag) printf("%s\n",(flag)?"yes":"no")
  43. /* macro definitions */
  44.  
  45. using namespace __gnu_pbds;
  46. using namespace std;
  47.  
  48. typedef long long LL;
  49. typedef unsigned long long ULL;
  50. typedef pair<int, int>pii;
  51. typedef pair<LL, LL>pll;
  52. typedef vector<int>vi;
  53. typedef vector<LL>vll;
  54. typedef vector<pii>vpii;
  55. typedef vector<pll>vpll;
  56. typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds_set;
  57. typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> pbds_multiset;
  58. /* type definitions */
  59.  
  60. LL MOD_EXPO(LL b, LL p, LL m)
  61. {
  62.     if(p==0) return 1;
  63.     LL ret=MOD_EXPO(b,p/2,m)%m;
  64.     ret=(ret*ret)%m;
  65.     return ((p&1) ? (ret*b)%m : ret%m);
  66. }
  67. LL POWER(LL N, LL K)
  68. {
  69.     LL i,ans=1;
  70.     for(i=1;i<=K;i++) ans*=N;
  71.     return ans;
  72. }
  73. int SET(int N, int pos)
  74. {
  75.     return (N | (1<<pos));
  76. }
  77. int RESET(int N, int pos)
  78. {
  79.     return (N & !(1<<pos));
  80. }
  81. bool CHECK(int N, int pos)
  82. {
  83.     return (N & (1<<pos));
  84. }
  85. /* necessary functions */
  86.  
  87. int dx4[]= {1,-1,0,0};
  88. int dy4[]= {0,0,1,-1};
  89. int dx6[]= {0,0,1,-1,0,0};
  90. int dy6[]= {1,-1,0,0,0,0};
  91. int dz6[]= {0,0,0,0,1,-1};
  92. int dx8[]= {1,-1,0,0,-1,1,-1,1};
  93. int dy8[]= {0,0,1,-1,1,1,-1,-1};
  94. int dkx8[]= {-1,1,-1,1,-2,-2,2,2};
  95. int dky8[]= {2,2,-2,-2,1,-1,1,-1};
  96. /* direction arrays */
  97.  
  98. int tc=1;
  99. const double eps=1e-9;
  100. const double pi=acos(-1.0);
  101. const long long int mx=1e5;
  102. const long long int mn=1e2;
  103. const long long int mod=1e9+7;
  104. /* global declarations */
  105.  
  106. int main()
  107. {
  108.     return 0;
  109. }
  110.  
Add Comment
Please, Sign In to add comment