Kaidul

kaidul

Feb 28th, 2015
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.01 KB | None | 0 0
  1. /****************************************************
  2.  * Kaidul Islam, Eyeball Networks Inc.
  3.  * topcoder: cohesion, codeforces: Kaidul, codechef: kaidul, hackerrank: kaidul, UVa: Kaidul
  4. **********************************************************************************************/
  5. #include <bits/stdc++.h>
  6. using namespace std;
  7. #define rep(i, n) for(__typeof(n) i = 0; i < (n); i++)
  8. #define rrep(i, n) for(__typeof(n) i = (n) - 1; i >= 0; --i)
  9. #define rep1(i, n) for(__typeof(n) i = 1; i <= (n); i++)
  10. #define FOR(i, a, b) for(__typeof(b) i = (a); i <= (b); i++)
  11. #define forstl(i, s) for (__typeof ((s).end ()) i = (s).begin (); i != (s).end (); ++i)
  12. #define INF (1 << 30)
  13. #define PI acos(-1.0)
  14. #define pb push_back
  15. #define ppb pop_back
  16. #define all(x) x.begin(), x.end()
  17. #define mem(x, y) memset(x, y, sizeof x)
  18. #define eps 1e-9
  19. #define pii pair<int, int>
  20. #define couple make_pair
  21. #define X first
  22. #define Y second
  23. #define vi vector<int>
  24. #define vpii vector< pii >
  25. #define si set<int>
  26. #define SDi(x) sf("%d", &x)
  27. #define SD2(x, y) sf("%d %d", &x, &y)
  28. #define SD3(x, y, z) sf("%d %d %d", &x, &y, &z)
  29. #define SDs(x) sf("%s", x)
  30. #define pf printf
  31. #define print(x) pf("%d ", x)
  32. #define println(x) pf("%d\n", x)
  33. #define output(x, y); pf("Case %d: %d", ++x, y)
  34. #define newLine pf("\n")
  35. #define sf scanf
  36. #define READ(f) freopen(f, "r", stdin)
  37. #define WRITE(f) freopen(f, "w", stdout)
  38. #if ( _WIN32 or __WIN32__ )
  39. #define LLD "%I64d"
  40. #else
  41. #define LLD "%lld"
  42. #endif
  43. #define SDl(x) sf(LLD, &x)
  44. #define MAX5 100000
  45. #define MAX7 10000000
  46. #define MAX9 1000000000
  47. #define MOD7 (MAX7 + 7)
  48. #define MOD9 (MAX9 + 9)
  49. typedef long long i64;
  50. typedef unsigned long long ui64;
  51. const i64 INF64 = (i64)1E18;
  52.  
  53. class TimeTracker {
  54.     clock_t start, end;
  55. public:
  56.     TimeTracker() {
  57.         start = clock();
  58.     }
  59.     ~TimeTracker() {
  60.         end = clock();
  61.         fprintf(stderr, "%.3lf s\n", (double)(end - start) / CLOCKS_PER_SEC);
  62.     }
  63. };
  64.  
  65. string toString(int num) {
  66.     ostringstream convert;
  67.     convert << num;
  68.     return convert.str();
  69. }
  70. struct Point {
  71.     int x, y;
  72.     Point(): x(0), y(0) {}
  73.     Point(int a, int b): x(a), y(b) {}
  74.     bool operator < (const Point& other) const {
  75.         return x < other.x;
  76.     }
  77. };
  78. // BitMask
  79. int Set(int N, int pos) {
  80.     return N = N | (1 << pos);
  81. }
  82. int Reset(int N, int pos) {
  83.     return N = N & ~(1 << pos);
  84. }
  85. int Check(int N, int pos) {
  86.     return (N & (1 << pos));
  87. }
  88. int toggle(int N, int pos) {
  89.     if( Check(N, pos) )
  90.         return N = Reset(N, pos);
  91.     return N = Set(N, pos);
  92. }
  93.  
  94. // direction array
  95. //int dx[] = {0, -1, 0, 1};
  96. //int dy[] = {-1, 0, 1, 0};
  97. //int Dx[] = {0, -1, -1, -1, 0, 1, 1, 1};
  98. //int Dy[] = {-1, -1, 0, 1, 1, 1, 0, -1};
  99. //int row, col;
  100. //bool isValid(int i, int j) {
  101. //    return i >= 0 and j >= 0 and i < row and j < col;
  102. //}
  103.  
  104. /** Implementation **/
  105.  
  106. int main(void) {
  107. #ifndef ONLINE_JUDGE
  108. //     READ("in.txt");
  109. //     WRITE("out.txt");
  110. #endif
  111.     int tcase, caseNo = 0;
  112.     // code goes here
  113.     return EXIT_SUCCESS;
  114. }
Advertisement
Add Comment
Please, Sign In to add comment