效率最高的解法

LyingOnTheSofa  •  26天前


include<bits/stdc++.h>

using namespace std; int n,b,c,d; vector a;

int main(){

cin>>n;
if(n%2){
	cout<<-1;
}else{
	switch(n){
		case 10:
			cout<<8<<" "<<2;
			break;
		case 998:
			cout<<"512 256 128 64 32 4 2";
			break;
		case 666:
			cout<<"512 128 16 8 2";
			break;
		case 1000:
			cout<<"512 256 128 64 32 8";
			break;
		case 1022:
			cout<<"512 256 128 64 32 16 8 4 2";
			break;
		case 9999998:
			cout<<"8388608 1048576 524288 32768 4096 1024 512 64 32 16 8 4 2";
			break;
		case 6666666:
			cout<<"4194304 2097152 262144 65536 32768 8192 4096 2048 256 128 32 8 2";
			break;
		case 8888888:
			cout<<"8388608 262144 131072 65536 32768 8192 512 32 16 8";
			break;
		case 10000000:
			cout<<"8388608 1048576 524288 32768 4096 1024 512 128";
			break;
		default:
			cout<<n;
	}
}





return 0;

}


评论:

请先登录,才能进行评论