#include < cmath >
#include < vector >
using namespace std;
// Korobov rules
vector < vector < double > > korobov( int a, // base
int n, // sample size(a prime)
int t) // dimensional
{
vector<double> G(t);
vector< vector<double> > U(n,vector<double>(t)); // t-dimensional points
int i,j;
for(i = 0;i < t;i++)
G[i] = pow(a,i) / (double)n;
for(i = 0;i < n;i++)
for (j = 0;j < t;j++)
{
U[i][j] = fmod(i * G[j],1);
}
G.clear();
return U;
}