modify poj3066, uva1319, icpcarchive2911