Hello Codeforces!
SlavicG, mesanu, MikeMirzayanov, Errichto, and I welcome you to Codeforces Round 790 (Div. 4). It starts on May/10/2022 17:45 (Moscow time).
The format of the event will be the same as before:
- 5-8 tasks;
- ICPC rules with a penalty of 10 minutes for an incorrect submission;
- 12-hour phase of open hacks after the end of the round (hacks do not give additional points)
- after the end of the open hacking phase, all solutions will be tested on the updated set of tests, and the ratings recalculated
- by default, only "trusted" participants are shown in the results table (but the rating will be recalculated for all with initial ratings less than 1400 or you are an unrated participant/newcomer).
We urge participants whose rating is 1400+ not to register new accounts for the purpose of narcissism but to take part unofficially. Please do not spoil the contest for the official participants.
Only trusted participants of the fourth division will be included in the official standings table. This is a forced measure for combating unsporting behavior. To qualify as a trusted participant of the fourth division, you must:
- take part in at least five rated rounds (and solve at least one problem in each of them),
- do not have a point of 1400 or higher in the rating.
Regardless of whether you are a trusted participant of the fourth division or not, if your rating is less than 1400 (or you are a newcomer/unrated), then the round will be rated for you.
Many thanks to the testers: timreizin, magnus.hegdahl, Adam_GS, KrowSavcik, qwexd, pseudocoder10, jampm, Neophiliatic, Codula and of course _Vanilla_.
We suggest reading all of the problems and hope you will find them interesting!
Good luck!
UPD: the start of the round is delayed by 10 minutes.
UPD: Editorial is published!
as a tester, please give back my upvotes from previous round
As a tester,I can confirm.
_
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
_
MikeMirzayanov, delete this comment, and block this saboteur idiot
you're literally green and you solved over 2000 problems................................ maybe get better at coding?
At least he is still trying and dedicating himself to improve his skills and this makes you respect him and his effort , unlike you talking and commenting bullshi*t from another account get life bro
You’re cyan… just get off of codeforces because clearly competition coding is not for you… I am orange on my main and I don’t believe cyans deserve to comment :)
Maybe competition coding is for you but clearly not codeforces community.
I'm sure your life must be very unpleasant, that's why you came to the internet to find your presence.
Codeforces, please add a way to hide a comment after you unhid it. Massive quality of life increase
reload the page, for now!
omg flamestorm round
As a tester, I really recommend y'all to do this round it's gonna be fire!
As an "of course tester", I am indeed a tester
Why are you chief-mentioned in every contest you test?
Helps with my superiority complex.
Good luck everyone!
I respect all the effort from the masters and candidate masters testers, but it seems weird to have a round for participants with ratings less than 1400 tested by such high rated users, isn't it??
true tho, only 2 of them are below 1400
First unrated round for me.... feeling like I'm a grand master :)
Same
:)
. Feels good to comment in Cyan.... Once again, no offence
me,too!haha
This will be my first unrated round
ㅤ
Hope my fingers work fast and I become Pupil this round
Please no more Div4!!!
Shouldn't it be rated only for newbies? Greens are not completely newcomers to allow them to get boost by easy implementation problems, they have already solved a lot of them in order to reach pupil.
As a tester I want you guys to know that every odd number is a part of Pythagorean triplet of the form x (x²-1)/2 (x²+1)/2 (where x is odd) also (x²-1)/2 and (x²+1)/2 are consecutive numbers.
thanks
This is a very cool way to generate pythagorean triplets btw.
Time to go blue
Omg pseudocoder10 tester! Orz.
what does orz mean??
a char picture,mean respect admire,just like ヽ(*´з`*)ノ (*'▽'*)♪ these
Thanks :)
btw are there more of these orz(can you send me).
Sure.But in order not to flood the screen,I can only post part of it.Hope you like them! happy: ✧٩(ˊωˋ*)و✧ (≧▽≦) surprise: Σ(っ °Д °;)っ (`Δ´)! angry: ╰(‵□′)╯ shy: (//∇//) debug: (ノ=Д=)ノ┻━┻ ac: (*'▽'*)♪ wa: 。゚(゚´Д`゚)゚。 hack: ψ(`∇´)ψ
Thank you sir for giving me enough rating for another chance to participate in div 4
hey Errichto...how's going on? You've a very good teaching youtube channel...right?
_
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
__
_
bruh
Why do you hate us so much?
first unrated contest.
Nice job
its also my first unrated round ... ;)
.
Will the round be rated for me? I was rated 1399 and registered as a rated participant. After the last div 2 round I reached specialist again. in the registrants page, that out of competition star ( * ) is not there on my name. Am I a rated participant?
No , this contest will still be unrated for you
I hope the hardest problem is not green rated otherwise full speedforces
first unrated round for me on codeforces. Its feels good to participate this type of contest. advance good luck for all of the newbes and pupils. hope it will be enjoyable round for everyone.
is there any cap on the max positive rating we can get from div4?
If it wasn't for school, I would have definitely done this contest!
Do it from school
lol, I have pe first period. I could grab my computer and hide in the bathroom, but that would be a lot of work lol
note 5 minutes delay
here wo go again :)
Was prepared to be the fastest guy on a wild west in fastforces and 5 min start delay haha
Actually 10 min :)
DelayForces
why delay wwuwuuw hahahah
5 minutes delay for cooling down the excitement ;-;
super excited for my first unrated contest, also haven't been giving contest in CF for some time
postponed again!
now its 10 minutes delay :3
delay for the 3rd time and i am not giving the contest
keep us informed
why so delay ? joke or not?
Another 5 minutes?
i do not know what's happening ??
adds another song to the playlist
It's a good opportunity to increase rating
The contest put off again and again...... It's 22:40 in China now!!! I want to sleep earlier!
me, too. I have to go to school tomorrow (at 6:30)
you can finish it in 30 minutes and get to sleep:)
Is it rated?
Use your brain: don't downvote the round just because of some as yet unknown issue that is almost certainly not the fault of any authors or coordinators.
Bal maat bako madarchod
Maybe they are waiting for 28K participants.
only reason im still motivated is because of the substring kitten there
Note the unusual start time :)
sbiforces (only indians can understand)
i did not understand
abhi lunchtime hai baadme ana
I thought I could participate on school. 10 minutes delay destroy my hope and dream :(
specialists after 1hr in div4: now we can rest
The submissions time of rank1, puckerbuttiampowerful, reminds me an algorithm called "three points". :(
I wonder if tourist can do faster than the 1st place.
This was very interesting and good round! Thanks for this tasks.
Yeah, but it is very sad that problem G was a tree problem, so I had to use bfs to solve it(
Since $$$P_i < i$$$, the traversal in reverse order from $$$n$$$ to $$$1$$$ is a topological order. Therefore you don't need BFS/DFS.
Better than last div4, excellent for newbies to learn.
One of my Friends warned me to never give a DIV-4 contest if u are new to coding!!
Div -4 is the worst Nightmare for actual newbie coders !! They sure get their worst ranks in div 4 !! Due to some overly smart people giving contest from new ID's. Today I can say its true!!
I don't know what fun they get by just seeing good ranks in their alternate accounts.
BYE BYE CodeForces, you got a TOXIC community out here!
get good and let's beat some overly smart people !!
you could just avoid div 4 and participate in div 2 and 3. Why leaving codeforces all together?
I already guessed how toxic this community is, full of nerds , you surely showed the toxicity by down voting a genuine concern!!
And then what?
Deleted
Your mistake was using out-of-bounds indices. There's nothing wrong with vectors.
Submission with Vector
Same Submission with Array :
Still couldn't find the mistake
arr.resize(n,vector<int>(m));
This doesn't completely reset a vector in case of multiple test cases.
resize()
doesn't touch existing elements.Same as you
The test2 of F was bothered me for a looooooooong time.......
same bruh, spend 1 hour+
I mistakenly thought F meant: For every x(l<=x,x<=r), ax has to occur more than k times between l and r Find the longest segment and output l,r This is much more difficult than the correct question
is H2 can be solved using a couple of vectors or a multiset? All I see is some trees here and there
Used Mergesort
It can be solved using gnu pbds in C++ .
provide required code pls
here it is, its not mine though
$$$O(N \log N)$$$ inversion counting in Div4? lol
idea matters, there are so many implementations on web
Here is my fenwick tree which i wrote during the contest.
why is it giving wrong answer.
...
try long long instead of int
the answer may be up to $$$2\times 10^{10}$$$ so use
long long
instead ofint
.got a penalty for this too :(
I made a Screencast + Solutions video in case someone is interested.
How to solve H2 ? I had noticed that the answer is n*(n-1)/2 — number of inversions in the reversed array a. Is there an easier way ?
Inversion count can be found in $$$O(n \log n)$$$.
I know this, but I'm a little suprised that so many people solved H2. Are there really a lot of people 0-1400 rated that knows such algorithm ?
There are really a lot of people who know how to use Google :)
or
Telegram
I am definitely not good at CP, but I solved 1200+ problems in online judge. There will be many people who have knowledge like me.
I used a comparatively different approach , for each index $$$i$$$ find the number of times value >=a[j] appear such that j<i.
H2 is very similar to this problem. Many people solved it before.
Take a merge sort + count inversions template from the web, change <= to <, and change int to long long, then H2 can become AC.
There's also and interesting solution using trie (not sure if it's well known). Here's my submission with such approach if you're interested:
https://mirror.codeforces.com/contest/1676/submission/156746831
You can also use a Segment/Fenwick Tree to solve the problem
how to solve H2? I have tried using multiset but it is showing TLE. Can anyone please give me any
hint
? Please put yourhint
inside spoiler tag.H2 is known as "Inversion Counting". You can find solution by using merge sort or Fenwick Tree(BIT)
But what is the concept or idea behind it?
I think this post will help you.
You can also use multi ordered set..Here is my sol 156673899
Very Nice and educational Problem .. this is how really div 4 should be
kudos to the authors
In the last 20 seconds i was about to submit my solution for H1... but it didn't load .I have a stable network but i didn't load then i had to submit it just 10-30 sec after the contest ended and got Ac. Please make sure that your servers act more fast ..... I wanted to do good badly but because of the servers ..........Felt bad so i expressed it i know many people can relate to it !
Too easy.Solve all in 34 minutes.Wish there will be more harder contests instead of easy dishes like this one...
How about you STOP SMURFING IN DIV4
What do u mean by SMURFING?
Nice round. It can be a nice idea if a new account needs at least 3 rated division-2 contests and solve at least one problem in each of them to be rated in a div 4 contest. Then many alts could have been removed and the actual ones could have got their deserved places. Again nice work by the authors.
My video editorial: https://youtu.be/98QD80PNA0Y
Why does my score not appear as "official", even if I have a rating of 1365?
I first thought it was because I have had a rating of more than 1400 in the past, but I have seen others which are official, and had ratings above 1400.
https://mirror.codeforces.com/contest/1676/submission/156634937 https://mirror.codeforces.com/contest/1676/submission/156634937 https://mirror.codeforces.com/contest/1676/submission/156729306 https://mirror.codeforces.com/contest/1676/submission/156739233 https://mirror.codeforces.com/contest/1676/submission/156707954 https://mirror.codeforces.com/contest/1676/submission/156625449 https://mirror.codeforces.com/contest/1676/submission/156709633 https://mirror.codeforces.com/contest/1676/submission/156734329 https://mirror.codeforces.com/contest/1676/submission/156736226 https://mirror.codeforces.com/contest/1676/submission/156707958 https://mirror.codeforces.com/contest/1676/submission/156738205
Hope these participants will be punished as their submissions clearly violates Codeforces rules (premeditated if cases to make hacks).
Remove the last one(156641831). Maybe a result of using endl and also not using fast io imo. Hence, TLE.
Thanks, fixed.
trash contest
trash comment
trash reply(including mine)
This is my first contest to solve in, i just want to know when do i get a rating? i solved 3 problems and i thought i'd get a rating after the contest ends since i am unrated. any clarification would be appreciated thanks
Ratings are usually updated a few hours after the contest, but since this contest has an open hacking phase which lasts 12 hours, you'll have to wait at least 12 hours more for your new rating.
Good luck!
First,you have to wait 12 hours since this contest need to be hacked. Then,you have to wait some hours since each submission need to be retest by more data(especially the hack data). Finaly,you only have to wait some hours again since the contest need time to calculate our rate.
5-8 tasks ?
Yes, -3 tasks.
Apologies if this was addressed before.
How are the rankings calculated in Div. 4 rounds?
based on your performance
I mean, how is performance calculated? Because there seems to be no score for each problem.
Based on how many problems you solved. If two participants solved the same amount of problems they are compared by time penalty
Won't anyone talk about the person who finished the contest in less than 9 minutes alone? The 1st place, btw this is my first rated round.. I'm just dazed
He solved five problems within 3 mins, that's an average of 36 seconds per question. I don't think it's possible by one person
36 seconds isn't even sufficient to read the whole question, so unless he already knew the questions beforehand, I think it's a high chance the first rated is done by a team instead of an individual
In Problem F, I use the unordered_map to store the data, but my code has been hacked. Can anyone tells me, why unordered_map is slower than map in C++.
Never use unordered_map in codeforces contests.Actually the time complexity is unstable,and in addition it will surely be hacked by some "interesting" coders.
I hacked your sol the reason is collision, in case of collision the time of search goes from O(1) to O(n) because the c++ handle collision in a linear data structure unlike that of Java which use AVL tree, so either use map ot custom hashing
My solution for Problem E was correct when I submitted it during the contest yesterday, but now after the system testing, it is showing as wrong. Does anyone know why is that so? :( (My solution even matches the one they explained in the editorial, idk why this happened)
It is again tested with the test case use in hacks, you have to find the test case for which it is failing, maybe it's small implementation issue
Time limit was too strict on F and editorial solution on python TLE's
Is this contest unrated?
This contest is rated for you as stated in the announcement. Just be patient.
I wonder what differentiated the TLE solutions and the AC solutions for question F when using pypy 3-64, around 85% of the accepted solutions for F in pypy3-64 either got hacked or TLE on test 22 in system testing
I solved 8 questions and it showed up perfectly fine in the unofficial standings section but in the official section it is showing that i only solved 4 questions and my rank is considered accordingly i.e 8000 which should have been around 700 or something in reality. This codeforces glitch will cost me my rating. Please resolve this glitch.
I have uploaded the images for proof...
link to unofficial ranking: https://photos.app.goo.gl/AzGA6H6yN9oKPbae7
link to official ranking:https://photos.app.goo.gl/rJwGDBkcw6wX8yEV8
is it rated or not?
It is rated
Ya i have the same issue.
Are your submissions not showing up in the official section as well?
I added both of you as friend. went for friends standings and it's showing perfectly.
check for the official standings and you will see the difference
It seem that the only way is to wait?.
yep
Ya now they have rectified the issue.
yess!
Everybody whose rating is less than 1400 will have a rating change after this round. You guys gotta be a bit patient, everything will be completed very soon. Currently all submission are being reviewed with new (added from hacking stage) test cases.
Please be quicker... I was in bad emotions because of that for near half a day!
You will surely become a specialist so I congratulate you!
Tested code in ideaone and kept it on public unknowingly (since my laptop was running slow during the contest). Codeforces sent mail saying two of other codes match my code. Will my rating be affected by this?
But ideone is private by default :sus:
I got a message from the system: "Your solution 156649522 for the problem 1676B significantly coincides with solutions srikaran_p/156626664, steve004/156649522."
Here steve004 is my this account itself. It is really a coincidence that my code matched with srikaran_p's code. We both use the same template as we are friends and we both code in c++ (you can verify that our templates are the same by seeing our submissions for other problems). And since the question was a very trivial one, our codes coincidentally match. We didn't cheat or share our codes with each other.
These are some of my submissions from a month back:
https://mirror.codeforces.com/contest/1676/submission/153970646 https://mirror.codeforces.com/contest/1676/submission/150125579
These are some of steve004's submissions from a month back:
https://mirror.codeforces.com/contest/1676/submission/154309721 https://mirror.codeforces.com/contest/1676/submission/153069256
We have been using the same template from a long time. Even for other problems in the same contest, we used the same template and our solutions are quite different for them. 1676B was a trivial problem and it was a coincidence that we had very similar codes. We did not share our codes with each other. Please revert the rating of steve004. We will change our templates to avoid getting into similar situations. Thank you
I solved all nine problems in 105 minutes with the "penalty" of 434. But the system said I achieved 501st place. According to the solves and the penalty, I should be 244th. And when I checked the "standings", I couldn't find myself anywhere. Can anyone help me explain that?
You are here: https://mirror.codeforces.com/contest/1676/standings/participant/132878345#p132878345
I am really surprised to see my submissions to this contest got skipped. I got this message:
Your solution 156694985 for the problem 1676D significantly coincides with solutions Aparna-Sakshi/156689249, karthikmv14/156694985. Such a coincidence is a clear rules violation.
I really don't know the person girl_on_fire before and I strongly know that this is purely coincidental and I guess in python this matching can happen with more probability as the solution is simple.
My solution
Her solution
Another question is why she is rated for this contest and I got this message? If your system thinks I cheated, then it might mean that she leaked her solution unintentionally/intentionally. Anyway my message is that I haven't copied from anywhere as this problem itself is quiet simple.
please look into it. Thanks.
Even I got the message, but I don't know about the rating part(probably some system error). But this is a pure coincidence. I have neither cheated nor leaked the solution to anyone/anywhere.
I hope the problems are a little more difficult Thanks to everyone for their efforts :)
Hi, Can anyone please explain the problem F. why 13,14 is picked instead of 11,14? Since both 11 and 14 occur 2 times and their difference will be maximum.?
Similarly in the sample test case given 5 1 6 3 5 2 1 Why 1 and 3 are selected instead of 1 and 6?
and in this sample test case: 14 2 1 1 2 2 2 3 3 3 3 4 4 4 4 4 1 and 4 are selected... Please don't give any hint or answer I want to solve this but am unable to understand the problem statement.
It's mentioned in the problem statement: For each $$$x (l \leq x \leq r)$$$, $$$x$$$ appears in $$$a$$$ at least $$$k$$$ times (i.e. $$$k$$$ or more array elements are equal to $$$x$$$).
So, not only $$$l$$$ and $$$r$$$ values should appear at least $$$k$$$ times, but also all the values in between.
In the first sample, $$$ l = 11, r = 14 $$$ is not correct because the condition for $$$12$$$ fails (it appears only once).