logic
codeforces just decreases 99 points for answering a question in div3, and does it part by part.