#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 = genSum(ng, nn);
  for (int i = 0; i < ng; i++)
  {
    int st = wg * i + wg / 2, en = st + ws;
    for (int j = 0; j < si[i]; j++)
    {
      s[n] = st - r(0, ws);
      t[n] = en + r(0, ws);
      t[n] -= s[n], n++;
    }
  }
}
