Advertisement
MinhNGUYEN2k4

Untitled

Dec 27th, 2020
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.16 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. #define int long long
  3. #define FOR(i,a,b) for(int i=(a),_b=(b); i<=_b; ++i)
  4. #define FORD(i,a,b) for(int i=(a),_b=(b); i>=_b; --i)
  5. #define REP(i,a) for(int i=0,_a=(a); i < _a; ++i)
  6.  
  7. #define DEBUG(X) { cout << #X << " = " << (X) << endl; }
  8. #define PR(A,n)  { cout << #A << " = "; FOR(_,1,n) cout << A[_] << ' '; cout << endl; }
  9. #define PR0(A,n) { cout << #A << " = "; REP(_,n) cout << A[_] << ' '; cout << endl; }
  10.  
  11. #define sqr(x) ((x) * (x))
  12. #define ll long long
  13. #define __builtin_popcount __builtin_popcountll
  14. #define SZ(x) ((int) (x).size())
  15. using namespace std;
  16.  
  17. double safe_sqrt(double x) {
  18.     return sqrt(max((double)0.0,x));
  19. }
  20. int GI(ll& x) {
  21.     return scanf("%lld", &x);
  22. }
  23.  
  24. #undef int
  25. int main() {
  26. #define int long long
  27.     ios :: sync_with_stdio(0); cin.tie(0);
  28.     cout << (fixed) << setprecision(9);
  29.     int ntest = 15;
  30.     cout << ntest << endl;
  31.     while (ntest--) {
  32.         int n = rand() % 2500 + 1;
  33.         cout << n << endl;
  34.         REP(i,n) {
  35.             if (rand() % 2 == 0) cout << 1000000 - rand() % 10 << ' ';
  36.             else cout << -1000000 + rand() % 10 << ' ';
  37.         }
  38.         cout << endl;
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement