SlavicG's blog

By SlavicG, 3 weeks ago, In English

Hello Codeforces!

mesanu, flamestorm, MikeMirzayanov and I want to invite you to Codeforces Round #799 (Div. 4)! It starts on Jun/14/2022 17:35 (Moscow time).

The format of the event will be identical to Div. 3 rounds:

  • 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: Neophiliatic, Qualified, sandry24, _Anurag, jampm, TimDee, Olympia, MoonKnight., AlperenT, BucketPotato and VIP-tester _Vanilla_.

And thanks to NEAR for supporting this round, details can be found in this post.

We suggest reading all of the problems and hope you will find them interesting!

Good Luck!

UPD: Editorial is posted!

 
 
 
 
  • Vote: I like it
  • +322
  • Vote: I do not like it

»
3 weeks ago, # |
  Vote: I like it +18 Vote: I do not like it

As the tester I want to say

orz orz orz big great SlavicG thank you for dib4 div 4 div orz

»
3 weeks ago, # |
  Vote: I like it +11 Vote: I do not like it

I wait it

»
3 weeks ago, # |
  Vote: I like it +17 Vote: I do not like it

Good luck for Everyone

»
3 weeks ago, # |
Rev. 3   Vote: I like it +41 Vote: I do not like it

As a tester, get SlavicG to top 10 contributors by upvoting all of his blogs.

»
3 weeks ago, # |
Rev. 2   Vote: I like it +18 Vote: I do not like it

As a VIP-Tester, I can guarantee that nobody's life was endangered prior to me getting this role.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +15 Vote: I do not like it

    As a tester, I can guarantee that vanilla is beneficial for health.

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it +23 Vote: I do not like it

      As a VIP-Tester, I can guarantee that eating vanilla icecream will give you positive delta.

»
3 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

I love div.4 rounds. Good luck for everyone who less than 1400**!

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    You talk more than you do

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Damn bro that's actually rude

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it +4 Vote: I do not like it

      Who told you I don't work hard every day !? I am a student in grade 8 so most of time is gone in studying! I have no time to code every time, but I do all my best to become a specialist.

      • »
        »
        »
        »
        3 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Continue your journey and don't care about people's (bad) minds.

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Nailed it! XDXD

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    keep working with time you will get better

»
3 weeks ago, # |
Rev. 3   Vote: I like it +8 Vote: I do not like it

Good luck for everyone

»
3 weeks ago, # |
  Vote: I like it +6 Vote: I do not like it

Thankyou to all the testers and problem setters, and good luck to everyone

»
3 weeks ago, # |
  Vote: I like it +9 Vote: I do not like it

Another Div-4 Round, thank you! I love these kind of problems!

»
3 weeks ago, # |
  Vote: I like it +4 Vote: I do not like it

Good luck in lightspeedforces round

»
3 weeks ago, # |
  Vote: I like it +6 Vote: I do not like it

If anyone knows the real name of Lemon Sunomono tell pls.

»
3 weeks ago, # |
  Vote: I like it +9 Vote: I do not like it

Last 2-3 contests were so difficult, I hope I do good in this one and get back to green.

»
3 weeks ago, # |
Rev. 2   Vote: I like it +8 Vote: I do not like it

I look forward to give my first contest in Java, which I learned recently :)

»
3 weeks ago, # |
  Vote: I like it +10 Vote: I do not like it

my first contest me as a unrated participant :)

»
3 weeks ago, # |
  Vote: I like it +2 Vote: I do not like it

This is my first contest as an unrated participant...Good luck everyone!!

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Does anyone here use CP Editor to run, compile and directly submit their codes in cf contests?

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Prepare for the memes about specialists being unrated :/

»
3 weeks ago, # |
Rev. 2   Vote: I like it +1 Vote: I do not like it

Thank you sir for organizing div 4 contest.I always love div 4 problems.I think all beginners also love div 4 problems.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

If someone is currently Specialist and is going to become Pupil after the end of Educational Round 130, should they register now and be *out of competetion, or wait for delta change and then register in competetion ?

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    wait for delta change and then register in competition, because maybe you'll get positive delta in this round.

»
3 weeks ago, # |
  Vote: I like it +3 Vote: I do not like it

First unrated round for me, feels good!

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Hope for the +ve delta in this round!!

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

What happens if someone is pupil and becomes specialist in the previous round but registers for this round as a pupil, will the contest be rated for them?

»
3 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

GOOD LUCK EVERYONE:) HOPE I'll able to solve 2+ problem in this contest;)

»
3 weeks ago, # |
  Vote: I like it +5 Vote: I do not like it

If I cannot make to specialist tomorrow, I will shave my head.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Then prepare your razor...... . . . . . . . just kidding

    All the best

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Post it if it happens

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +4 Vote: I do not like it

    please post, I'm dying to see this

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    adding you to see your performance

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Sorry everyone, I have done my best, it's midnight here, I felt my head is going to explode:( Still can't tackle H, why am I always missing a problem to AK a Div.4 Round? Maybe I can't reach cyan, I will post the pic later:)

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      you definitely reached cyan. Good job!

      • »
        »
        »
        »
        3 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Wow, I can't believe it, thanks!

        btw now I have to consider how to not drop from cyan:)

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    you made it! well done

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

All the best everyone!

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

What approximate rank will I be needing in Div4 to get +120 Delta if my current rating is 1280 and I have given only 5 contests before?

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

First unrated contest for me.

»
3 weeks ago, # |
Rev. 2   Vote: I like it +14 Vote: I do not like it

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

My first unrate contest OwO

P.S. Good luck for everyone.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I'll be a specialist, when they will give a rating for Educational Codeforces Round 130 (Rated for Div. 2)

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it +1 Vote: I do not like it

      You sure? System testing for that round isn't done yet and your solution for C is O(n^2) imo, so your solution might TLE. P.S.- I hope you pass though :)

»
3 weeks ago, # |
  Vote: I like it +17 Vote: I do not like it
»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

It's a good rules and good job. Thanks for you

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I wanted to add VIP tester _Vanilla_ as a friend, but he is currently a friend of 69 users.... so I'll let it be for now

  • »
    »
    3 weeks ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    Wise decision, breaking such balance would bring chaos upon our universe.

    UPD: It seems like someone has already done it. The legend says he will have negative delta for the rest of his life.

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      well now that it's already at 71, let's just try to get it to 420!

      (RIP @ whoever got cursed for breaking the balance)

»
3 weeks ago, # |
  Vote: I like it -9 Vote: I do not like it

contest on my birthday, hopefully i don't lose rating lol

»
3 weeks ago, # |
  Vote: I like it -12 Vote: I do not like it

I think the time to be Pupil is come Insha'Allah hope to a good contest

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Thoughts on the takeover?

»
3 weeks ago, # |
  Vote: I like it +5 Vote: I do not like it

Good luck everyone , hope this would be a fun and interesting round to be participated in.

»
3 weeks ago, # |
  Vote: I like it +10 Vote: I do not like it

leetcode monthly contest?

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Best of luck to everyone!

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Is it possible to move up to a specialist from this contest?

»
3 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

The contestant plays the role of red coder by solving 7/8 problems in div-4

»
3 weeks ago, # |
  Vote: I like it +33 Vote: I do not like it

![ ](IMG-20220613-223340)

»
3 weeks ago, # |
  Vote: I like it +7 Vote: I do not like it

My first unrated round :)

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

first contest as an unrated participant

GOOD LUCK TO EVERYONE!

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Div 4 contests are more frequent nowadays, NICE.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Hooray for div 4, I can at least do the task, otherwise it's difficult to solve div 2 or div 3.Good luck to everyone . All testers and the author of the Olympiad div 4, thank you.**__**

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

"take part in at least five rated rounds (and solve at least one problem in each of them)"

Is it some new feature? I can't remember the same thing being about a year before. Especially because my rating has been changing since my first rated contest.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Actually this rule is for only div3 and div4 rounds. If anyone participate his/her first contest other than div3/div4 then the round is rated for him/her.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Good Luck Every one;

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

What are the hacks? What can participants do? Sorry, maybe dumb question, but I am first time here

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    You can view other people's solutions and find a test case that makes their code fail, that's hacking

»
3 weeks ago, # |
  Vote: I like it +2 Vote: I do not like it

As a tester, I can assure you this is going to be one of the best div4 round till now, congrats to the problem-setters for the great problems, and I wish yall good luck!

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

So are D4 contests just speed games? I'm slow.

»
3 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

Will Try to Finish it under 40 min. Previous record is 50 min. Let's see if we can break it Today!!

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    Well seems like it wasn't speed forces after all.

    I really loved problem H.

    • »
      »
      »
      3 weeks ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      Yeah i came late and got stuck on H because i am a retard clown whose always do the silly mistake everytime. i liked problem H i have solved this type of problems before a lot. So for me i was doing nothing new as implementing what i implemented before.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Hopefully I get to candidate master after this round! very excited

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

First unrate contest, lol

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Does anyone have a problem with the dollar sign in problem page all brackets sees like $ sign.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Best of luck to everyone

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Hope every want to be Specialist can be Specialist.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

div4 is more likely speedforces. all the best everyone

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

All the best!

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Difficulty:

»
3 weeks ago, # |
  Vote: I like it +3 Vote: I do not like it

Once again, if you are not sure, I will say as tester — this round is really fire, it's one of the best quality rounds of last months, and best div4 I ever took part in. I suggest everyone reading all problems (even Blue-Purple-Yellow-Red participants). Good luck and have fun writing this contest.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

First unrated round! I believe that I can enjoy myself as well as the problems this time.

GL; HF!

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

First unrated :D

»
3 weeks ago, # |
  Vote: I like it +3 Vote: I do not like it

hopefully, I will motivate again for this contest. thank you for arranging div4 for the newbie

»
3 weeks ago, # |
  Vote: I like it -28 Vote: I do not like it

Downvoted. DIV4 SHOULD DISAPPEAR!

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

i am going to participate at 1399 rating points. xD

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

2 hours 15 minutes sounds like a slightly harder round... interesting.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Just for my curiosity, was it really harder in your opinion? When I tested problem H seemed very respectable :D

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Not hard in my opinion but interesting, i will solve the unsolved ones for sure.

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it +1 Vote: I do not like it

      Yeah, feels like H was around 1600-1700 rated in terms of implementation and apart from that I really liked how creative D and F problem were.

      This time it was a different Div. 4 round :)

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Good luck everyone!

»
3 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

Can I register lately?

»
3 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

Rip cfsubmit didn't work properly for me when submitting to problem C, costing me 4th place :(

Nevertheless, I clutched 6th place with a meme screencast: https://www.youtube.com/watch?v=Aw_U6cnUh-0&ab_channel=JoshuaChen

»
3 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

Very educational contest! This is the type of Div 4s that enjoy participating in.

»
3 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

the last problem is very nice, kudos to the author

»
3 weeks ago, # |
  Vote: I like it +6 Vote: I do not like it

Nice H..

»
3 weeks ago, # |
  Vote: I like it +48 Vote: I do not like it

Nice contest! For those who are interested, my screencast and solution explanations to all problems will be available at https://www.youtube.com/secondthread as soon as the contest is over.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

nice round, F is interesting

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Guess it's just me, but this time are problems too hard for DIV. 4 can't even sort out 2nd problem last DIV4 I solved almost 3 problems.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    take your time and really apply yourself and try to upsolve as much problems as possible. It helps alot. Also look at the solution for all the problems, even for the ones you have solved, it might give you insights you hadn't thought about.

»
3 weeks ago, # |
  Vote: I like it +4 Vote: I do not like it

Enjoyed the round. Thanks to the problem authors! :)

»
3 weeks ago, # |
  Vote: I like it +4 Vote: I do not like it

Awesome contest, Nice set of problems !! Thanks to the authors <3

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I choked F lol. I missed $$$7 + 7 + 9$$$. Cost me 3 penalties...

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Nice Contest, second problem was a bit tricky rest all were good!

»
3 weeks ago, # |
  Vote: I like it +2 Vote: I do not like it

H was nice

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I was trying to solve the E problem with 2 pointers by making an array of indices where there are 1's and calculating the difference and moving accordingly. Was I correct ??

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yes, this will work, but a simpler approach is to calculate maximum length subarray with sum s .

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

can someone tell me what am i doing wrong here for question F

https://codeforces.com/contest/1692/submission/160638148

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    First, explain your logic, and then I'll check it.

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      sorry for downvoting its pressed by mistake

      here I first make frequency array of remainder than I go to each case such that on adding it gives either 3 or 13 or 23 than i check if it is possible by checking their frequencies

      • »
        »
        »
        »
        3 weeks ago, # ^ |
        Rev. 2   Vote: I like it 0 Vote: I do not like it

        The approach is right,just move case(x==y && y==z) to the first place because it will never execute when x=y or y=z or x=z;

»
3 weeks ago, # |
  Vote: I like it +6 Vote: I do not like it

I believe that this was the perfect div. 4 round! Problems were educational and of perfect difficulty.

»
3 weeks ago, # |
  Vote: I like it +3 Vote: I do not like it

I get 4000-5000 ranks in div2 and 12000 in div4 feels like hell:°(

»
3 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Can someone please tell me what's wrong with my two pointers solution for problem E? 160627514

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Explain your logic and variable names first, and then I'll check it.

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      thanks bro. "i" stands for pointers from the begin, and "j" for the end. Bufa is the number of 0 from the begin while bufb is from the end. The two pointers would increment 1 generally. In the meantime, one would check wether the other pointer can get a 1 with lower 0 counts.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

It's 3Sum not Threesome

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

loved problem F. not because of the problem, but because of the name ;)

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

cannot access editorial its redirecting to previous path

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

cf definitely hates me, just because i put 3 instead of 4 got WA on test 1 (the WA on 8 was because of l)

i would've got specialist :/

first and last code compared
  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    bro if your code will fail test cases then you will only get WA nothing like hates or something.

»
3 weeks ago, # |
  Vote: I like it +12 Vote: I do not like it

Congratulations to authors for problem H!Very interesting!

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

What is wrong about my code of Problem C

  • »
    »
    3 weeks ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    I think the separation of and is the issue, but a little tip: just dont use if() rather than hold v[i][j] and compare this to all 4 indexes you are comparing with. Makes it a bit easy to me to not get confused. I hope it helped you. Edit: Ya, Now i saw that use of '=' instead of '=='.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    On line 19 in your code, within the if condition, you are using assignment (=) instead of comparison (==)

    Here's the AC version

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    if(ans[i][j]='#'), should be ==. You can even remove that if.

  • »
    »
    3 weeks ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    I think you've made a mistake on line 19 in your code, whilst writing the if condition.

    assigment is (=). comparison is (==).

    You have used the assigment operator instead of the comparison operator.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

helping for beggenier

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

i loved this contest ( except for d) hope i can reach pupil again

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I have a wrong submission for first test, will that be counted as a panelty l.

»
3 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

nice problems but a bit hard for div.4

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

why map gave tle in b?

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    nope, i did that with map. Looks like you are checking 10000 times for 1000 test cases, note that here sum of n is not bounded.... So your solution likely went over 10^6 computations hence the TLE. You should instead iterate over the input array.

  • »
    »
    3 weeks ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    If the size of map is n,each times,the time of useing map[i] is log(n). I see your code,even the map[i] is 0,u search it.This need log(n) to modify the map and log(n) to query. I advise u to use for(auto it:'map's name') to query each in map.That will avoid insert and modify the map[i] that == 0. What's more u only need to know the number of the kind.So set would be a better choice. The ans is the size of the set.And if (n — ans) is odd,u have to ans--,since u can only remove two numbers each op. Here is my submission that use set to slove:160536879

»
3 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Hello people,

I couldn't figure out what's wrong with my code for problem C. I would appreciate any guidance,help, answer or hint in order for me to correct it.

https://codeforces.com/contest/1692/submission/160649178

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    think what happens when the answer is "NO"

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I think that the input() in python also reads blank lines, so when you try to iterate from 0 to 7 produces runtime error. Also in your answer you don't put an space between str(outputs[k][0]) and str(outputs[k][1]). But the logic is perfect, it's simpler than what I did.

    • »
      »
      »
      3 weeks ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      Hello, thank you for your response

      I just update my code according to my understanding of your idea added another input line for blank line (it has been said that input cases should be seperated by a blank line) but I'm still having the same issue. Could you propose an adjustment to it please.

      https://codeforces.com/contest/1692/submission/160663411

      • »
        »
        »
        »
        3 weeks ago, # ^ |
        Rev. 2   Vote: I like it +3 Vote: I do not like it

        In the case of:

        3 <- num of test cases
         <- empty line
        ..#...#. <- line with 8 characters
        

        The program will fail in the second line, because when you do array_elements = [array_elements[i] for i in range(0,8)] you will have an out-of-bounds error, because len(array_elements) is zero.

        So we want to ignore empty lines, no matter the position, for this I simply add a while loop:

        array_elements = "" # empty string
        while len(array_elements) == 0:
            array_elements = input()
        

        I don't believe this is the adecuate method because I don't program in python, but it solves you error

        • »
          »
          »
          »
          »
          3 weeks ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Hello,

          Firsty I would like to thank you for you effort. Your solution worked fine. The problem was that the issue you mentionned with "array_elements = input()" that could capture a blank line is literally non existant when running the code locally. Locally array_elements captures the right string which ".....#.." (for example) and when printing len(array_elements) I get 8. In brief, I couldn't reproduce that error locally so there was no way I could figure it out all alone. Thanks again for your help

  • »
    »
    3 weeks ago, # ^ |
    Rev. 4   Vote: I like it 0 Vote: I do not like it

    You can take a look at my solution to C. I also ran into the blank line issue mentioned below and this should be a working fix.

    https://codeforces.com/contest/1692/submission/160574335

    I have a scanner class for reading input and output, which might prove useful to you. I haven't tested its speed yet, but it seemed to be good enough for this contest.

    Of course the while loop should also be added to Scanner.read_line() as well. For this see:

    https://codeforces.com/contest/1692/submission/160679009 (ignore the fact that it is hacked LOL)

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I tried to hack a submission of H, but the judge returned 'Unexpected verdict'. is it my hack's failure ? or judge's?

»
3 weeks ago, # |
  Vote: I like it +19 Vote: I do not like it

There are some Unexpected verdict in the Hacks of problem H.

This blog said that it's because one of the solutions marked on Polygon as Correct can't pass the hack data.

Please fix the problem.

»
3 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

I'm curious why it's rated for everyone rated less than 1400 whether or not they are a trusted partipant? Someone rated >= 1400 can create a new account just before the contest and ruin the ratings of Trusted participants right? SlavicG mesanu flamestorm MikeMirzayanov

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    No. The contest is rated for everyone less than 1400 but only official participants are considered while deciding the actual delta. So new accounts won't have any effect

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Then how will the delta for non-trusted participants be calculated?

      • »
        »
        »
        »
        3 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        This is a necessary fact. Reform This problematic method Proposal High self-ability

      • »
        »
        »
        »
        3 weeks ago, # ^ |
        Rev. 2   Vote: I like it 0 Vote: I do not like it

        If I'm not wrong, all new accounts have a 1400 hidden rating at the start. For the first 5 or 6 rounds, you are gaining additional rating points which sum is equal to 1400 (that's why you can solve 0 problems but receive something like 357rating) + normal rating delta for the account that started with 1400 points.

        • »
          »
          »
          »
          »
          3 weeks ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          No, not anymore! These days new users start with a rating of 0 and not 1400.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

How does Hack system works in Div 4 Rounds?

If someone for which round is rated get hacked for a particular problem will it also reflects on their ranking while deciding the standing or rating?

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

vanila orz, vanila solve gadfadar

»
3 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

Problem H was a nightmare for unordered map users. Also idk why a lot of python users are getting hacked in this problem.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

And I was thinking I would reach specialist after this round.

»
3 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Is it possible to see what test cases people are hacking with? A lot of python solutions for H are getting hacked and I would like to test mine against these hacks.

If anyone would like to hack my submission here it is: https://codeforces.com/contest/1692/submission/160678189

Edit: Thank you beethoven97! Could you weigh in on the method of your hack? Are you exploiting the dictionary's hashing method?

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Amazing round, my first time solving all problems,even though the last one only after the contest. Great feeling!!

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

What is the case of 73 of test 2? Not accepted, someone help me please. 160678922

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

In H, will finding optimal subarray length for every distinct gives TLE? If not then why? If yes, then how to solve it?

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Really good contest, thank you to all authors and testers. Problem F was quite interesting and H seems to be a good problem, I haven't solved it yet tho

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

How come O(N) time solutions of Problem H using map in python give TLE and get hacked ?

»
3 weeks ago, # |
Rev. 6   Vote: I like it 0 Vote: I do not like it

Understood the method, found out about Kadane's algorithm!

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Why doesn’t the rating change for me?

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Can anyone please point out the error in my code/logic (Problem G). I used a sliding window approach by making a window of size k. The variable bad used in my code tells the last index till the current index where the inequality does not hold.

My submission
https://codeforces.com/contest/1692/submission/160622089

  • »
    »
    3 weeks ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    You can try this case:

    1
    10 3
    1000 20 10 5 9 10 11 12 13 14
    

    Answer is 4 but your solution output 6.

    I found that you will break after finding the bad position for the first time, which causes if there are multiple bads in the length of k, you will only find the first one

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Now I changed your code :

        f(i, 1, temp.size())
        {
            if (2 * temp[i] <= (temp[i - 1]))
            {
                poss = false;
                bad = i;
                //break;
            }
        }
    

    And Accept 160742816.

    It's a good idea, just didn't notice the details

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Is there any indication of whether the regrade has happened yet?

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

When will rating updated?

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Why did the round go unrated ?

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    why would you say that? nothing was announced yet

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    It is rated. The same thing happened last week it showed unrated and then the rating came up, they took a little time to update.

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Excuse my question, but how does a contest show up as unrated?

      How do you know?

      • »
        »
        »
        »
        3 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Same thing happened in round#797 .It was showing up unrated at first. If im not wrong , ratings will show up within an hour or a two.

»
3 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

system test not done yet, still more to wait

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Still not rated?

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Legends are still waiting for rating changes :)

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I think this is the longest time I waited for rating change

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    are you expecting a colour change?

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Intially I expected that I'll be Cyan for my rank and number of participants but realised It doesn't happen in Div4 and now you are seeding doubt for even green colour change

      • »
        »
        »
        »
        3 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        even I am waiting for my color change. But now it seems like this competition was maybe unrated. IDK though

        • »
          »
          »
          »
          »
          3 weeks ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          The competition won't be unrated unless the team officially announces it. So currently, it is rated. As it involved a 12-hour open hacking phase, there may be some delay in reflecting the rating changes.

          • »
            »
            »
            »
            »
            »
            3 weeks ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            I see. But its been almost 12 hours since the hacking phase ended.

        • »
          »
          »
          »
          »
          3 weeks ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Congrats for your Color Change :)

          • »
            »
            »
            »
            »
            »
            3 weeks ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            Thanks a lot Aravind! Congrats to you too!!!

»
3 weeks ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

if you want to learn to type fast https://data.typeracer.com/pit/home is right for you

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

»
3 weeks ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

Rated

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Any idea when rating will be updated??

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I have not done any cheating in the contest. It is a simple coincidence. I don't even know the person with whom I am caught. Please look into the matter again. I didn't violate any rules. Please consider my submissions and give respective ratings. [contest: Codeforces Round #799 (Div. 4)] 1692D - The Clock 160638839 pratham0703

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Rating changes when sad noises

»
3 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

I don't know why my solution is said to be matching with others if there I have my unique method of solving that question and some others solve that question by that particular method it doesn't mean that it was copied, as many questions have many methods to solve. This is unfair.

»
3 weeks ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

it is a coincidence that my solution is matching form the other solution mentioned in mail by system. Also I had done my code by my own. My solution of question A of contest 799 is matching with many other because it is simple one and it has a simple method and everyone followed that ,this does not mean that I have copied from other. So I request you to give my rating back.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Finally Green

»
3 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it
In the problem H unordered_map gives TLE while map and gp_hash_table gives AC:(.Typical unordered_map behaviour.

using unordered_map:https://codeforces.com/contest/1692/submission/160690124 using map:https://codeforces.com/contest/1692/submission/160753527 using gp_hash_table:https://codeforces.com/contest/1692/submission/160753661

»
3 weeks ago, # |
Rev. 4   Vote: I like it 0 Vote: I do not like it

i

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Is it possible that a person less rated than other one and has got more rank in the contest than the other one, after rating change become more rated than other one??

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yes, if that contest of more ranked participant is still less than or equal to 6

»
45 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Div4 contests are so easy.