some algorithm in acm