
void max(int n,string name){
	var NP=getVariantov(n);
	trace("Variantov:"+NP);
	var ks=getValuesInLaver(n,name);
	trace(ks.export());
	j=0;
	for(i=0;i<NP;++i)if(ks[i]>ks[j])j=i;
	for(i=0;i<NP;++i)if(i!=j)LaverOFF(n,i);
}


int f1(){
	n=rozpad({1,2,3,4,5,6,7,8,0});
	define(0,"max","n");
	trace(n);
}


int main(){
	var pos=getFunctionRoot("f1");
	++pos;
	int n=createNewLaver();
	int p=createNewProcess(n,pos);
	runLaver(n);
/*
	//trace(getLaverMessage(n));
	var NP=getVariantov(n);
	trace("Variantov:"+NP);
	var ks=getValuesInLaver(n,"n");
	trace(ks.export());
	j=rand()%NP;
	for(i=0;i<NP;++i)if(i!=j)LaverOFF(n,i);
	runLaver(n);
*/
	getstring();
}


