works on Eclipse, fail in OJ