This is my final C language assignment in last semester. There's an obvious bug in the submitted version, that is, wrong method of calculating liberty. So now I try to fix this.