摘要:
#include <iostream>using namespace std;int a[20];int l[20];int r[20];int b[20];bool flag;int lcnt,rcnt;void calc(int n){ int i = 0; while(n/3) { a[i++] = n%3; n = n/3; } a[i] = n;}void balance(){ int i; for(i=0;i<20;i++) { if(a[i]==3){a[i+1]++;a[i]=0;} if(a[i]==2) { l[i] =1; a[i+1]++; a[i]= 阅读全文