Exemplo n.º 1
0
int main(){
	while(scanf("%d",&n)!=EOF){
		if(!n) break;
		for(int i=1;i<=n;++i)
			scanf("%d",&a[i]);
		getsuffix();
		work();
	}
	return 0;
}
Exemplo n.º 2
0
int main(){
	scanf("%d%d",&n,&K);
	for(int i=1;i<=n;++i){
		scanf("%d",&a[i]);
		rank[i].a=a[i];
	}
	getsuffix();
	int l=0,r=n/2,m;
	while(l<=r){
		m=l+r>>1;
		if(check(m))
			l=m+1;
		else
			r=m-1;
	}
	while(l&&!check(l)) --l;
	printf("%d\n",l);
	return 0;
}
Exemplo n.º 3
0
void test(){

	getsuffix("ethnic");

}
Exemplo n.º 4
0
// read the tranditional infile for the distance matrix
void Mdist::readmtx(const string& file){
    if(getsuffix(file) == "nc")
	readmtxnc(file);
    else
	readmtxtxt(file);
};