double t(int N1[], int N2[], double weight[]) {
		int R1 = 0, R2 = 0;
		int k = N1.length;

		for (int i = 0; i < k; i++) {
			R1 += N1[i];
			R2 += N2[i];
		}

		double t = 0;
		for (int i = 0; i < N1.length; i++)
			t += weight[i] * ((N1[i] * R2) - (N2[i] * R1));

		return t;
	}