poj_2718 ac code