AC version with 2000ms limit on openjudge