fixed icpc1998dA