public static void main(String[] args) {
		Random gen = new Random();
		int n, k;
		if (args.length == 1) {
			n = Integer.valueOf(args[0]);
			k = gen.nextInt(n) + 1;
		} else if (args.length == 2) {
			n = Integer.valueOf(args[0]);
			k = Integer.valueOf(args[1]);
		} else {
			n = gen.nextInt(10000);
			k = gen.nextInt(n) + 1;
		}

		System.out.println(String.format("n = %d k = %d", n, k));
		for (int i = 0; i < 6; ++i) {
			int[] res = online_sampling(n, k);
			System.out.print("result = ");
			simplePrint(res);
			System.out.println();
		}
	}