sacgajcvs

Untitled

Dec 6th, 2019
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.98 KB | None | 0 0
  1. // #pragma GCC optimize("Ofast")
  2. // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
  3. // #pragma GCC optimize("unroll-loops")
  4. #include <bits/stdc++.h>
  5. #include <ext/pb_ds/assoc_container.hpp>
  6. #include <ext/pb_ds/tree_policy.hpp>
  7.  
  8. #define FAST std::ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
  9. #define DECIMAL(n) std::cout << std::fixed;std::cout << std::setprecision(n);
  10. #define hell 1000000007
  11. #define narak 998244353
  12. #define PI 3.14159265358979323844
  13. #define mp make_pair
  14. #define eb emplace_back
  15. #define pb push_back
  16. #define fi first
  17. #define se second
  18. #define ALL(v) v.begin(), v.end()
  19. #define SORT(v) sort(ALL(v))
  20. #define REVERSE(v) reverse(ALL(v))
  21. #define endl "\n"
  22. #define maxc(v) *max_element(ALL(v))
  23. #define minc(v) *min_element(ALL(v))
  24. #define sqr(a) (a)*(a)
  25. #define GCD(m,n) __gcd(m,n)
  26. #define LCM(m,n) m*(n/GCD(m,n))
  27. #define inputarr(a,n) for(int xxx=0;xxx<n;++xxx) cin>>a[xxx]
  28. #define rep(i, n) for(int i = 0; i < (n); ++i)
  29. #define repA(i, a, n) for(int i = a; i <= (n); ++i)
  30. #define repD(i, a, n) for(int i = a; i >= (n); --i)
  31. #define trav(a, x) for(auto& a : x)
  32. #define sz(a) (int)a.size()
  33. #define sl(a) (int)a.length()
  34. #define invect(data,n,commands) for(int xxx = 0;xxx<n;xxx++){int tmp;cin>>tmp;data.pb(tmp);commands}
  35. #define inset(data,n,commands) for(int xxx = 0;xxx<n;xxx++){int tmp;cin>>tmp;data.insert(tmp);commands}
  36. #define display(x) trav(a,x) cout<<a<<" ";cout<<endl
  37. #define debug cerr<<"bhau"<<endl
  38. #define between(n,a,b) (a<=n&&n<=b)
  39. #define clamp(n,a,b) (((n)<(a))?(a):(((n)>(b))?(b):(n)))
  40.  
  41. #define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
  42. template <typename Arg1>
  43. void __f(const char* name, Arg1&& arg1){
  44. std::cerr << name << " : " << arg1 << endl;
  45. }
  46. template <typename Arg1, typename... Args>
  47. void __f(const char* names, Arg1&& arg1, Args&&... args){
  48. const char* comma = strchr(names + 1, ',');std::cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
  49. }
  50.  
  51. #define elasped_time 1.0 * clock() / CLOCKS_PER_SEC
  52.  
  53. template<typename T, typename U> static inline void amin(T &x, U y)
  54. {
  55. if (y < x)
  56. x = y;
  57. }
  58. template<typename T, typename U> static inline void amax(T &x, U y)
  59. {
  60. if (x < y)
  61. x = y;
  62. }
  63.  
  64. std::mt19937_64 rng(std::chrono::steady_clock::now().time_since_epoch().count());
  65.  
  66. #define ll long long
  67. #define ld long double
  68. #define pii std::pair<int, int>
  69. #define pll std::pair<ll, ll>
  70. #define vi vector<int>
  71. #define vvi vector<vi >
  72. #define vii vector<pii >
  73. #define point complex<ll>
  74. #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
  75.  
  76. /*----------------------Graph Moves----------------*/
  77. //const int fx[]={+1,-1,+0,+0};
  78. //const int fy[]={+0,+0,+1,-1};
  79. //const int fx[]={+0,+0,+1,-1,-1,+1,-1,+1}; // Kings Move
  80. //const int fy[]={-1,+1,+0,+0,+1,+1,-1,-1}; // Kings Move
  81. //const int fx[]={-2, -2, -1, -1, 1, 1, 2, 2}; // Knights Move
  82. //const int fy[]={-1, 1, -2, 2, -2, 2, -1, 1}; // Knights Move
  83. /*------------------------------------------------*/
  84.  
  85. //primes for hashing 937,991,1013,1409,1741
  86.  
  87. std::ostream& operator<<(std::ostream& out,pii a)
  88. {
  89. out<<a.fi<<" "<<a.se;
  90. return out;
  91. }
  92. std::ostream& operator<<(std::ostream& out,pll a)
  93. {
  94. out<<a.fi<<" "<<a.se;
  95. return out;
  96. }
  97. std::istream& operator>>(std::istream& in,pii &a)
  98. {
  99. in>>a.fi>>a.se;
  100. return in;
  101. }
  102. std::istream& operator>>(std::istream& in,pll &a)
  103. {
  104. in>>a.fi>>a.se;
  105. return in;
  106. }
  107.  
  108. using namespace std;
  109. using namespace __gnu_pbds;
  110. struct pt {
  111. int x, y, id;
  112. };
  113.  
  114. struct cmp_x {
  115. bool operator()(const pt & a, const pt & b) const {
  116. return a.x < b.x || (a.x == b.x && a.y < b.y);
  117. }
  118. };
  119.  
  120. struct cmp_y {
  121. bool operator()(const pt & a, const pt & b) const {
  122. return a.y < b.y;
  123. }
  124. };
  125.  
  126. void meowmeow321()
  127. {
  128. int n;
  129. cin>>n
  130. trace(...);
  131. }
  132. int main()
  133. {
  134. FAST;
  135. int testcases=1;
  136. //cin>>testcases;
  137. for(int i=0;i<testcases;++i)
  138. {
  139. meowmeow321();
  140. }
  141. cerr<<endl<<"Time Elasped : "<<elasped_time<<endl;
  142. return 0;
  143. }
Advertisement
Add Comment
Please, Sign In to add comment