codeforces one-based arithmetic completed