Problem Description
There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two village A and B are connected, if and only if t...
方法1(代码附上,暂时未行通,有兴趣可以修改一下)
#include
int dectobe(int n)
{
int temp=n;
int k=1;
int result=0;
int i;
while(temp)
{
i=temp%2;
result=k*i+result;
k=k*10;
temp=n/2;
printf("%d
"...