Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. //#pragma GCC optimize("Ofast")
  2. //#pragma GCC target("avx")
  3. #include <bits/stdc++.h>
  4. #include <ext/pb_ds/assoc_container.hpp>
  5. #include <ext/pb_ds/tree_policy.hpp>
  6.  
  7. using namespace __gnu_pbds;
  8. using namespace std;
  9.  
  10. #define fi first
  11. #define se second
  12. #define pb push_back
  13. #define sz(x) ((int)x.size ())
  14. #define all(x) (x).begin(), (x).end()
  15. #define re return
  16. #define mp make_pair
  17. #define sqrt(x) sqrt (abs(x))
  18. #define y0 y3451
  19. #define y1 y4562
  20. #define j0 j25624
  21. #define j1 j45624
  22. #define makeunique(x) sort(all(x)), (x).resize (unique(all(x)) - (x).begin())
  23.  
  24. typedef pair <int, int> ii;
  25. typedef long long ll;
  26. typedef unsigned long long ull;
  27. typedef double D;
  28. typedef long double ld;
  29. typedef unsigned int uint;
  30. typedef vector <string> vs;
  31. typedef vector <int> vi;
  32. typedef vector <ii> vii;
  33. typedef vector <vi> vvi;
  34.  
  35. template <class T> using _tree = tree<T, null_type, less<T>, rb_tree_tag,tree_order_statistics_node_update>;
  36. template <class T> T abs (T x) { re x > 0 ? x : -x; }
  37. template <class T> T sqr (T x) { re x * x; }
  38. template <class T> T gcd (T a, T b) { re a ? gcd (b % a, a) : b; }
  39. template <class T> int sgn (T x) { re x > 0 ? 1 : (x < 0 ? -1 : 0); }
  40.  
  41. #define filename ""
  42.  
  43. const int N = 2e5 + 20;
  44. const int inf = 1e9 + 20;
  45.  
  46. int n, m;
  47.  
  48. int main()
  49. {
  50. // freopen("out.txt", "w", stdout);
  51. srand(time(0));
  52. n = m = 3000;
  53. int k = 40;
  54. cout << n << " " << m << endl << k << endl;
  55. for (int i = 0; i < k; i++) {
  56. int x, y;
  57. x = rand() % n;
  58. y = rand() % m;
  59. cout << x + 1 << " " << y + 1 << "\n";
  60. }
  61. int t = 1;
  62. for (int i = 0; i + 1 < 500; i++) {
  63. t = t + 1 + rand() % 300;
  64. cout << t << " ";
  65. int x, y;
  66. x = rand() % n;
  67. y = rand() % m;
  68. cout << x + 1 << " " << y + 1 << " ";
  69. x = rand() % n;
  70. y = rand() % m;
  71. cout << x + 1 << " " << y + 1 << "\n";
  72. }
  73. for(int i = 0; i < 5; i++)
  74. cout << -1 << " ";
  75. cout << "\n";
  76. re 0;
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement