#include "gen.h"

void gen( int argc, char *argv[] )
{
  assert(argc == 2);
  int nn = atoi(argv[0]);
  int ng = atoi(argv[1]);
  int maxw = 1000000000;
  int wg = maxw / ng;
  int ws = wg / 5;
  vector <int> si[2] =
    { genSum(ng / 2, nn / 2), genSum(ng / 2, nn / 2) };
  for (int k = 0; k < 2; k++)
    for (int ii = 0; ii < ng / 2; ii++)
    {
      int i = ii + k * ng / 2;
      int st = wg * i + wg / 2, en = st + ws;
      for (int j = 0; j < si[k][ii]; j++)
      {
        s[n] = st - r(0, ws);
        t[n] = en + r(0, ws);
        t[n] -= s[n], n++;
      }
    }
}
