palmerstone

new_template

Nov 22nd, 2012
701
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <cstdio>
  2. #include <cmath>
  3. #include <cstring>
  4. #include <cctype>
  5. #include <cstdlib>
  6. #include <climits>
  7. #include <ctime>
  8. #include <cassert>
  9. #include <istream>
  10. #include <ostream>
  11. #include <iostream>
  12. #include <iomanip>
  13. #include <algorithm>
  14. #include <vector>
  15. #include <string>
  16. #include <numeric>
  17. #include <fstream>
  18. #include <sstream>
  19. #include <map>
  20. #include <set>
  21. #include <list>
  22. #include <stack>
  23. #include <queue>
  24. #include <deque>
  25. #include <complex>
  26. #include <limits>
  27. #include <bitset>
  28. #include <iterator>
  29. #include <utility>
  30. #include <functional>
  31. #include <tr1/unordered_map>
  32.  
  33. #define eps (1e-9)
  34. #define vinf (1 << 28)
  35. #define nvinf (-(1 << 28))
  36. #define inf ((~0U) >> (1))
  37. #define pi (2.0 * acos(0.0))
  38. #define d_zero(x) (abs(x) < eps)
  39. #define lowbit(x) ((x) & (-(x)))
  40. #define sine(x) (sin(radians(x)))
  41. #define cosine(x) (cos(radians(x)))
  42. #define setbit(x, i) (x |= (1 << i))
  43. #define tangent(x) (tan(radians(x)))
  44. #define arcsine(x) (degrees((asin(x))))
  45. #define resetbit(x, i) (x &= (~(1 << i)))
  46. #define arccosine(x) (degrees((acos(x))))
  47. #define arctangent(x) (degrees((atan(x))))
  48. #define d_equals(a, b) (d_zero((a) - (b)))
  49. #define getbit(x, i) (x & (1 << i) ? 1 : 0)
  50. #define clr(ar) (memset(ar, 0, sizeof(ar)))
  51. #define radians(x) (((1.0 * x * pi) / 180.0))
  52. #define degrees(x) (((x * 180.0) / (1.0 * pi)))
  53. #define read() (freopen("lol.txt", "r+", stdin))
  54. #define out() (freopen("out.txt", "w+", stdout))
  55. #define write() (freopen("lol.txt", "w+", stdout))
  56. #define d_lesser(a, b) (!d_equals(a, b) && (a) < (b))
  57. #define d_greater(a, b) (!d_equals(a, b) && (a) > (b))
  58. #define dbg(x) (std::cout << #x << " = " << x << endl)
  59. #define flipbit(x, i) (getbit(x, i) ? (resetbit(x, i)) : (setbit(x, i)))
  60. #define twopow(x) ((((x & (x - 1)) == 0) && (x != 0)) ? (true) : (false))
  61. #define mod(n, m) ((n >= 0) ? (n % m) : ((abs(n) % m) == 0) ? 0 : (m - (abs(n) % m)))
  62.  
  63. using namespace std;
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×