int readint(int c){//讀取c位二進制字符,並轉化爲十進制 int v = 0; while(c--)v = v*2 +readchar()-'0'; return v; }
int readchar(){ for(;;) { int ch = getchar(); if(ch !='\n'&&ch!='\r') return ch; } }