poj1338. priority queue