generated html version of envelopes.cHOME

#include "stdio.h"
#include "stdlib.h"
#include "time.h"

int A[15] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14};

void suhfle(){
	int i,j;
	for(i=14;i>1;i--){
		j=rand()%i;
		int t = A[j];
		A[j]=A[i];
		A[i] = t;
	}
}

int main(){
	int i,r;
	int N,M;//strategies
	const int R = 100000; //sample
	srand(time(0));
	printf("A=  123456789abcdef\n");
	for (N=1;N<=15;N++) {
	printf("B=%x ",N);
	for (M=1;M<=15;M++) {
	int nwin=0;
	for (r=0;r<R;r++) {
		int n=-1,m=-1;
		suhfle();
		for(i=0;i<N;i++)
			if(A[i]>n)n=A[i];
		suhfle();
		for(i=0;i<M;i++)
			if(A[i]>m)m=A[i];
		if(n>m) nwin++;
		else if(m>n) nwin--;
		else if(N<M) nwin++;
		else if(M<N) nwin--;
	}
	if(nwin > 50000)putchar('B');
	else if(nwin > 30000)printf("β");
	else if(nwin > 10000)putchar('b');
	else if(nwin > 1000)putchar(',');
	else if(nwin < -50000)putchar('A');
	else if(nwin < -30000)printf("α");
	else if(nwin < -10000)putchar('a');
	else if(nwin < -1000)putchar('.');
	else putchar('-');
	}
	putchar(10);
	}
}