SleepyShashwat's blog

By SleepyShashwat, 5 months ago, In English

Good Evening Codeforces! ^_^

This round is unrated; please read this to know why.

I invite you to participate in Codeforces Round #682 (Div.2) taking place on Nov/13/2020 17:35 (Moscow time). The round, authored by Anti-Light and me, is rated for users rated less than 2100, while other users can participate non-competitively.

The round features six problems, and you have 2 hours to solve them. There may, or may not, be an interactive problem; regardless, you should know how to deal with them.

I would, now, like to thank–

We will announce the scoring distribution shortly. The scoring distribution is 500–750–1250–1750–2250-3000.

Good luck, and stay safe!

UPD: Editorial

For students in high school or below—

Participants who are currently in high school or below are eligible to win prizes — 25 USD gift cards to 5 random participants who solve at least 3 problems. Prizes are sponsored by Athena Education and are NOT related to Codeforces. To be eligible, please fill this form (it will be closed after the round ends). If you're interested in participating in other technical events, such as Machine Learning and Computational Linguistics, please head over to exunclan.com.

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

»
5 months ago, # |
Rev. 2   Vote: I like it +4 Vote: I do not like it

Registered Participants are eligible for the following prizes.

Registered participants on round or those who filled the form?

  • »
    »
    5 months ago, # ^ |
      Vote: I like it +34 Vote: I do not like it

    Those who filled the form; I have edited the blog to reflect this. Thank you!

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

      Is there any special registration for those who are participating in EXUN Clan's contest by DPS RKP?

»
5 months ago, # |
  Vote: I like it +8 Vote: I do not like it

Hmm, it would have made sense if there were cash prizes for top rankers + random people, or only top rankers. But to have prizes only for random people is a bit weird.

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

Expecting a Good Problem Set. Because it's SleepyShashwat

»
5 months ago, # |
  Vote: I like it +17 Vote: I do not like it

Hope you weren't sleepy while writing problem statements.

  • »
    »
    5 months ago, # ^ |
      Vote: I like it +17 Vote: I do not like it

    He lost a lot of sleep due to problem statements, that's why he's sleepy now.

»
5 months ago, # |
  Vote: I like it -141 Vote: I do not like it

.

  • »
    »
    5 months ago, # ^ |
      Vote: I like it -24 Vote: I do not like it

    Seems like first time we are seeing Monogon loosing contribution

    • »
      »
      »
      5 months ago, # ^ |
        Vote: I like it +75 Vote: I do not like it

      I'll have to find a new source of dopamine now

      • »
        »
        »
        »
        5 months ago, # ^ |
        Rev. 2   Vote: I like it -32 Vote: I do not like it

        Seems like you already found one, But sadly I have to loose some of my contributions because of above comment. Though I don't care about it(but who doesn't like green++).

        Edit:Also I can see realnimish gaining +47 because of my username, thats interesting. I think people should atleast appreciate my username, if they don't like the comments XD.

    • »
      »
      »
      5 months ago, # ^ |
        Vote: I like it +55 Vote: I do not like it

      Its a trap

    • »
      »
      »
      5 months ago, # ^ |
        Vote: I like it +13 Vote: I do not like it

      You just see he will reply to the comments like yours and get 1k upvotes.

»
5 months ago, # |
  Vote: I like it +78 Vote: I do not like it

intresting problems.

»
5 months ago, # |
  Vote: I like it +33 Vote: I do not like it

I'm currently in high school but over 2100, so this round will be unrated for me. Will I still be eligible for any prizes?

»
5 months ago, # |
Rev. 2   Vote: I like it -25 Vote: I do not like it

As a tester these problems were very interesting!

»
5 months ago, # |
  Vote: I like it +98 Vote: I do not like it
Mandatory meme
  • »
    »
    5 months ago, # ^ |
      Vote: I like it -15 Vote: I do not like it

    yea codforces should provide more contests :,)

»
5 months ago, # |
  Vote: I like it +1 Vote: I do not like it

[Your text to link here...](IMG_20201111_021152.jpg)

  • »
    »
    5 months ago, # ^ |
      Vote: I like it -8 Vote: I do not like it

    I am telling you that cute little face had no idea that round would be unrated.. Though had fun first 10 minutes of rounds..

»
5 months ago, # |
  Vote: I like it +135 Vote: I do not like it

Finally!

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

Wow that's a whole lot of testers!

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

Now I am more excited about the 3b1b-style video editorials!!

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

lol, 1 week without contest,

It was difficult, MikeMirzayanov

»
5 months ago, # |
  Vote: I like it +13 Vote: I do not like it

please we request don't take 10 days gap for codeforces contest

»
5 months ago, # |
  Vote: I like it +71 Vote: I do not like it

These 10 days made me realise the plight of div 1 users. Guys hats off to your patience (all div 1 users)

»
5 months ago, # |
  Vote: I like it -6 Vote: I do not like it

yo 3b1b type videos? that's sick

»
5 months ago, # |
  Vote: I like it +4 Vote: I do not like it

Finally a contest now :)

It seems that there are much more people testing for the contest. So I think this Div.2 would be an excellent one :)

  • »
    »
    5 months ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    Oh no, it became an unrated contest becuase of B :-(

  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I think I would like to delete my comment :-(

    Picture below shows how I feel when I saw the announcement that the contest is unrated...

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

Finally something to cheer about

»
5 months ago, # |
Rev. 2   Vote: I like it -15 Vote: I do not like it

hoping for good problem set SleepyShashwat

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Waited)

»
5 months ago, # |
  Vote: I like it +18 Vote: I do not like it

![ ](IMG_20201113_113829.jpg)

»
5 months ago, # |
  Vote: I like it +4 Vote: I do not like it

Wow, there is Anti-Light in writers too!!

I guess this round is going to be awesome.

»
5 months ago, # |
  Vote: I like it +22 Vote: I do not like it

Happy Diwali :)

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

after a long waiting we got codeforces div 2 round thanks a lot...

»
5 months ago, # |
  Vote: I like it -9 Vote: I do not like it

B should be of 1000 points like every contest. Don't know why they changed that in this contest.

»
5 months ago, # |
  Vote: I like it -8 Vote: I do not like it

Indian Round :)

»
5 months ago, # |
  Vote: I like it -17 Vote: I do not like it

They say it's an Indian contest but it isn't just an Indian contest, it's an Indian_Iranian contest. Because Anti-Light is Iranian. So... it means it's gonna be so good.

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I didn't finish the form which to prove i'm a high school student. Could I finish it now?

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

Happy Diwali Everyone !!

»
5 months ago, # |
  Vote: I like it +101 Vote: I do not like it

problems are very sexy 10/10 would bang

»
5 months ago, # |
  Vote: I like it -23 Vote: I do not like it

Is it rated?

»
5 months ago, # |
  Vote: I like it +1 Vote: I do not like it

»
5 months ago, # |
Rev. 2   Vote: I like it +5 Vote: I do not like it

happy diwali to everyone out there

this diwali i pray to god so that your code gets compiled and accepted at one go(mine too :) ).

happy diwali happy coding

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

Every body holds his hat XD

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

registered already but showing need to register to submit

»
5 months ago, # |
  Vote: I like it +1 Vote: I do not like it

queue?

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I submitted a source code before they changed N and T, and got WA for no reason, very cool.

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Why the fuck the statement of B is changing?

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

No No Not again! Why Cf why ?

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

what's going on. is that really unrated?

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

I don't get it

What was wrong with B?

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

    same here, i also saw the correct constraints after submitting A in 2 minutes(they said constraints were wrong for 10 minutes)

»
5 months ago, # |
  Vote: I like it +13 Vote: I do not like it

Got a round after so many days and that too became unrated :(

»
5 months ago, # |
  Vote: I like it +57 Vote: I do not like it

Friday the 13th

»
5 months ago, # |
  Vote: I like it -9 Vote: I do not like it

When I will tell my granchildren that we had rated contests on CodeForces, I bet they wouldn't believe me.

»
5 months ago, # |
  Vote: I like it +6 Vote: I do not like it

After waiting for so many days, we got unrated round... :-(

»
5 months ago, # |
  Vote: I like it +4 Vote: I do not like it

Why unrated? I was really fast in ABC, so sad :/

»
5 months ago, # |
  Vote: I like it +32 Vote: I do not like it

So sad that this is unrated! It's first time I pass the D

»
5 months ago, # |
  Vote: I like it +59 Vote: I do not like it

The problems are really good!

It's a pity that so many testers and no one caught the issue with constraints on B :(

  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    What was the issue? I didn't get it !! Were the constraints low or high?

  • »
    »
    5 months ago, # ^ |
      Vote: I like it +29 Vote: I do not like it

    Too many chefs spoils the food

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

    Agree the problems were quite good could have been a great round.

  • »
    »
    5 months ago, # ^ |
      Vote: I like it +30 Vote: I do not like it

    I don't want to say too much, but this isn't the fault of testers.

    • »
      »
      »
      5 months ago, # ^ |
        Vote: I like it +90 Vote: I do not like it

      It is neither author's fault nor testers'. I guess it's contestants' fault that they couldn't guess the correct Constraints.

      • »
        »
        »
        »
        5 months ago, # ^ |
        Rev. 2   Vote: I like it +36 Vote: I do not like it

        How about let's try to understand the situation better instead of making pointless sarcastic statements that no one actually implied.

        There are more people involved in contest preparation than just author and tester. Several times accidents have happened because things are changed (and sometimes, need to be changed) at last minute, when most testers have already completed their job.

        And often in real life, taking the blame isn't as easy as "it is person X's fault". There are often cases where something is shitty but no one actually really did anything wrong. Of course something has to change but it isn't as simple.

        • »
          »
          »
          »
          »
          5 months ago, # ^ |
          Rev. 3   Vote: I like it +10 Vote: I do not like it

          Okay, sorry for that but if things are changed at the last minute, then it is better is postpone the contest and have it tested again. It's better for everyone.

        • »
          »
          »
          »
          »
          5 months ago, # ^ |
            Vote: I like it +17 Vote: I do not like it

          don't get me wrong but if the above comment was by Monogon you must have laughed and upvoted too.

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

      Maybe they don't even know if the constraints are right or not, so it is not appropriate to put the responsibility on the testers without thinking about it, I think.

»
5 months ago, # |
  Vote: I like it +14 Vote: I do not like it

You know . when you make round unrated half of participants are happy and half not !. im in unhappy group . also when the reason of that is just a bit change in limits!!!!

»
5 months ago, # |
  Vote: I like it +9 Vote: I do not like it

when u finally get <2k rank but round becomes unrated :(

»
5 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Luckily I didn't use array with constant space in B

»
5 months ago, # |
  Vote: I like it +78 Vote: I do not like it

40 testers and noone used assert while testing to check the constraints??? Seriously what did all these testers do? Felling sad for the authors :(

  • »
    »
    5 months ago, # ^ |
      Vote: I like it +35 Vote: I do not like it

    Don't you know, testers job is to ask for contributions?

    • »
      »
      »
      5 months ago, # ^ |
        Vote: I like it +41 Vote: I do not like it

      Actually, testers could not get any contribution.

  • »
    »
    5 months ago, # ^ |
      Vote: I like it +12 Vote: I do not like it

    It's writer's job to add validator and validator tests. And coordinator's job to check if the author did it.

    • »
      »
      »
      5 months ago, # ^ |
        Vote: I like it +17 Vote: I do not like it

      I know, I was involved in preparing and testing many contests (Not Codeforces rounds). Usually while testing assert should added every where, to check the constraints and all other conditions.

»
5 months ago, # |
  Vote: I like it +13 Vote: I do not like it

Very disappointing. 3 questions inside 25 mins and on track for CM status, and then it's unrated because the constraints were wrong.

I sympathise with the writers and am grateful for the effort that is put in. How did the testers not pick this up?

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

What was the mistake(in constraints) in B ?

  • »
    »
    5 months ago, # ^ |
      Vote: I like it +6 Vote: I do not like it

    The correct constraint is $$$2 \leq n \leq 1000$$$, but at the beginning of the contest it was $$$2 \leq n \leq 2 \times 10^5$$$. Now the constraints have been fixed.

    • »
      »
      »
      5 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I think it is the other way. The tests where with arrays of size up to 2e5, but the statement stated n<=1000. Then they changed the statement, then the tests, then the statement again to be like it first was.

»
5 months ago, # |
  Vote: I like it +14 Vote: I do not like it

I am not sure what the testers are supposed to do but confirming the constraints seems like one of the first things to do. Anyways, the problems were nice. Also, I think there should be a gap between different tests in sample. Makes it a lot easier to read.

»
5 months ago, # |
  Vote: I like it -12 Vote: I do not like it

Happy Diwali Everyone!

»
5 months ago, # |
Rev. 3   Vote: I like it -30 Vote: I do not like it

.

»
5 months ago, # |
  Vote: I like it +49 Vote: I do not like it

It's a shame the round is unrated, the problems are quite beautiful. The issue with constraints on B was not the fault of authors, so please don't downvote the blog out of anger.

  • »
    »
    5 months ago, # ^ |
      Vote: I like it -52 Vote: I do not like it

    ok,We will downvote your comments from now on

    • »
      »
      »
      5 months ago, # ^ |
        Vote: I like it +79 Vote: I do not like it

      Downvote me for being supportive of the setters who had nothing to do with the cause of it being unrated? Okay, then I'm proud of those downvotes

      • »
        »
        »
        »
        5 months ago, # ^ |
          Vote: I like it +14 Vote: I do not like it

        Ok I had some slightly bad information at the time I made my comment, but I still stand that people shouldn't downvote the announcement or comments before understanding how the error happened. Still just wait for an explanation of what went wrong.

    • »
      »
      »
      5 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I don't think it's a wise move ...

      I know you're angry for the contest, yes, we are all disappointed, but no matter how the contest is, it's not the fault of these users who write their comment, I think. So it may be a better choice to delete what you say just now.

      No offense to anyone.

»
5 months ago, # |
  Vote: I like it +15 Vote: I do not like it

Feeling Sad for SleepyShashwat !!! Problem set were really good !!

»
5 months ago, # |
  Vote: I like it +9 Vote: I do not like it

(IMG_20201113_213202.jpg)

»
5 months ago, # |
  Vote: I like it -6 Vote: I do not like it

This is the first time i solved a problem with in 60 seconds i got 500 points but sadly the contest became unrated :(

  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    yeah and this is the first time I solved problem B in a contest.

»
5 months ago, # |
  Vote: I like it +61 Vote: I do not like it

Even though it's unrated, don't discuss the problems, please, before the end of the contest. Writer is still going to give prizes

  • »
    »
    5 months ago, # ^ |
      Vote: I like it -13 Vote: I do not like it

    But why though? It evidently affected the round enough to make it unrated, but it still holds credibility for the Exun event (where you represent your school)?

»
5 months ago, # |
Rev. 2   Vote: I like it -10 Vote: I do not like it

ready for the next round!

»
5 months ago, # |
  Vote: I like it +15 Vote: I do not like it

One request to codeforces if round is unrated please use bold letters so we don't get a blow after a while

»
5 months ago, # |
  Vote: I like it +61 Vote: I do not like it

»
5 months ago, # |
Rev. 2   Vote: I like it +81 Vote: I do not like it

[Deleted]

»
5 months ago, # |
  Vote: I like it +1 Vote: I do not like it

B positive

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

The tasks were really very interesting.

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

When you solve 3 problems in 12 mins finally, after consecutive blows in previous contests, and the entire universe conspires to screw your rating!

»
5 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Damn I couldn't get C but solved D and climbed to rank 18 for a moment. And now I am like bruh

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Will try hard next time...

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Actually,B doesn't really need an array.

»
5 months ago, # |
  Vote: I like it +8 Vote: I do not like it

Thank you. I love Codeforces!

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I sweeped A+B within 15 minutes and then watched the round ruin. But the problems were interesting, hoping to face more like these in future.

»
5 months ago, # |
  Vote: I like it +6 Vote: I do not like it

If you got the idea of problem B, it didn't matter the constraints. And the notification of the correction was done with plenty of time to review the problem for any player. I don't think the effect to the score would be stronger than what happens when hidden tests fail at the end of the round after pretests passed. In my opinion, the round shouldn't be unrated...

»
5 months ago, # |
  Vote: I like it +61 Vote: I do not like it

»
5 months ago, # |
  Vote: I like it -12 Vote: I do not like it

came to read comment section just to be sure that It's unrated.

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I was supposed to lose 73 points... and then the round became unrated.

Anyways, I still think it's a pity that the round is unrated because problem B was nice (even though I couldn't solve it). Based on comments, the remaining problems were also nice.

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

well i think i found solution to C but its way too hard for C and takes too long to code ... D was really easy for me on the other hand maybe im a potato :/

  • »
    »
    5 months ago, # ^ |
      Vote: I like it +11 Vote: I do not like it

    C is easy: You just have to make the parity of a[i][j] the same as i + j.

  • »
    »
    5 months ago, # ^ |
      Vote: I like it +14 Vote: I do not like it

    Well, you could make some elements even, and some elements odd. After actions your matrix mod 2 should look like:

    0 1 0 1
    1 0 1 0
    0 1 0 1
    1 0 1 0
    

    So the algorithm is:

    if ((i % 2) + (j % 2) % 2 && a[i][j] % 2) a[i][j]++;
    else if ((i % 2) + (j % 2) % 2 == 0 && a[i][j] % 2 == 0) a[i][j]++;
    
»
5 months ago, # |
  Vote: I like it +4 Vote: I do not like it

Today maybe it was my best performance , and it got unrated .In the next contest it will be rated and I will get a minus 50. Cause that's life.

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

    But it'll not change the fact that it is your best performance today isnt. Don't put a number tag on everything , life will be beautiful.

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

what is wrong with this idea for $$$D -$$$ If n is odd $$$or$$$ (n is even and there is no odd frequency element) then $$$YES$$$ else $$$NO$$$

  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    If all elements xor =0, then n is even will still be possible

  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    It should be : if n is odd or (n is even and the xor of all the elements is 0) then Yes else No !

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

    Try this testcase: 4

    4 1 7 2 Answer is: YES

    1

    1 2 3 because: 4 XOR 1 XOR 7 = 2

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

What is wrong with my code(problem D) https://codeforces.com/contest/1438/submission/98320619

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

Dear division 1, the short interaction between you and me was nice. Now, we have to part away.

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

.

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

    for each i and j, ensure that inp[i][j] + i + j is even (or odd). then adjacent numbers will have opposite parity, making sure that adjacent numbers are different.

  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Try to arrange elements like ,

    0101010
    1010101
    0101010
    

    where 0 represent an even number and 1 represent an odd number. Of course you can always change the parity of a number by adding 1 to it.

    I have seen that most of the people have done it by using dfs also.

»
5 months ago, # |
  Vote: I like it +6 Vote: I do not like it

Well it was Friday the 13th. Coincidence? I think not :)

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Can someone explain how to solve problem C?

»
5 months ago, # |
Rev. 2   Vote: I like it +76 Vote: I do not like it
»
5 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

did you also overcomplicated solution for B or are you normal?

expected solution was if all elements are distict print "NO" else "YES".

»
5 months ago, # |
  Vote: I like it +10 Vote: I do not like it

So in D, I constructed solution for odd n and couldn't get the x-or = 0 thing for even n, foolishness 100. Just got it now.

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

    for n-odd i think the solution is xor between all numbers and that's all. So you just have to print 1,2,3 1,4,5 .. 1,n-1,n for n-even i think you don't have solution if : all numbers have the same bit 1 or xor between all isn't 0. WA on test 4

  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Same thing.

»
5 months ago, # |
  Vote: I like it +19 Vote: I do not like it

Did anyone else use 2-SAT for C? xD

  • »
    »
    5 months ago, # ^ |
      Vote: I like it +37 Vote: I do not like it

    twf using dfs for C

    • »
      »
      »
      5 months ago, # ^ |
        Vote: I like it +17 Vote: I do not like it

      Pfft, you aren't a real programmer if you don't solve 2-SAT by putting it into your own hyper-optimized (exponential but still super fast) 400-row general SAT solver.

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Nobody did any hacking, interesting XD

»
5 months ago, # |
  Vote: I like it +56 Vote: I do not like it

It's okay that the round is unrated. It happens.

However, I hope the announcement would emphasize the fact that it's unrated when it's unrated. I saw only the first two sentences of the announcement, and I didn't read the rest of it because I saw that it was talking about problem B and I already passed it, so I thought there is no need for me to read it any further.

  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Exactly. I just now came to know that the round is unrated :(

»
5 months ago, # |
  Vote: I like it -8 Vote: I do not like it

How will the prizes be given now since the round is unrated and maybe many participants left the contest in between?

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

Can anyone explain why my dfs solution for C is giving wrong answer on pretest-2 here's my Submission.

I've tried it on some other test cases and unable to find any mistake. Can anyone help?

  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it
    Spoiler

    Basically, it's possible for your code to increment the same value twice.

»
5 months ago, # |
Rev. 5   Vote: I like it +34 Vote: I do not like it

My solutions:

A
B
C
D
F
E
»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it
»
5 months ago, # |
  Vote: I like it +8 Vote: I do not like it

Finally 13 th November. It's Unrated,still intrigued with some great problems....

»
5 months ago, # |
  Vote: I like it -30 Vote: I do not like it

Lodu contest

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Can anyone please tell me as to why this solution to B was wrong?

Link to Submission
  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    You need to read the full input for each test case.

  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Try this testcase

    1

    5

    2 2 2 2 2

    Your programme will not take all of the inputs.

»
5 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Never keep a contest on Friday the 13th

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Is it unrated now?

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it
»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

We want one more rated contest in this week as this contest became unrated

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Why this solution doesn't work 98303387, but this solution works 98327745?

  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Because in the first one when i=n-1, a[i+1] is out of bounds.

»
5 months ago, # |
Rev. 3   Vote: I like it +11 Vote: I do not like it

Important test case is missing from D. I submitted what should be an incorrect solution, and later resubmitted a correct solution. However, my incorrect solution also passes.

The test case in question is where N = 4 and the answer is YES, e.g. N = 4, A = 2 2 2 2, or N = 4, A = 1 1 3 3

My incorrect code printed out "N-4" as the the number of steps, which gives an output: steps = 0, ops = 1 2 3

Clearly this is incorrect, and I corrected my code to output: steps = 1, ops = 1 2 3

However the test cases are not currently sufficient to identify this bug.

  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I think it's checker's job to check the correctness of your output

    The checker reads the number of steps. Because it's 0, the checker doesn't read any operations and your output is correct. CMIIW

    • »
      »
      »
      5 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      0 would be an incorrect number of steps in the case N = 4, A = 1 1 3 3

      • »
        »
        »
        »
        5 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Yeah you're right, I didn't test your program with the last input

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

some please point the mistake in this Problem C solution solution_link

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

Easy solution to problem E:

Notice that if $$$a_l \oplus a_r = a_{l+1} + a_{l+2} + ... + a_{r-2} + a_{r-1}$$$ is satisfied, then $$$a_l + a_r \geq a_{l+1} + a_{l+2} + ... + a_{r-2} + a_{r-1}$$$ is also satisfied.

Assume we fix the position of the rightmost element $$$r$$$. Now let $$$l$$$ be the index of the first element to the left of $$$r$$$, so that $$$a_l + a_r \geq a_{l+1} + a_{l+2} + ... + a_{r-2} + a_{r-1}$$$. The sum of $$$a_l ... a_r$$$ is at least twice as large as the sum of $$$a_{l+1}...a_{r-1}$$$. Lets denote the sum $$$a_{l+1}...a_{r-1}$$$ by $$$x$$$. Notice that the element at the next valid left endpoint will have to be at least $$$x * 2$$$, the next one at least $$$x * 4$$$ ... Hence there are at most $$$log(maxA)$$$ candidate left endpoints for a single $$$r$$$. We can check all of these subarrays $$$O(N \cdot logN \cdot log(maxA))$$$ time using range queries or set (the solution works with a very small constant factor).

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

Hello, a newcomer here.

I was trying to use pypy3 to do F, and I got a lot of TLE's. I tried many ways to go around this, but I wasn't able to find a not-very-dodgy solution: I had to do it in "batches"

https://codeforces.com/contest/1438/submission/98332683

Is there a not-very-dodgy way to do this with pypy?

Here are some of my failed attempts: https://codeforces.com/contest/1438/submission/98331404 https://codeforces.com/contest/1438/submission/98330796

  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I agree with this. I can't find a way to fit the solution within the time limits using pypy either.

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

can anyone explain code from jiangly

    int t;
    std::cin >> t;
    while (t--) {
        int n, m;
        std::cin >> n >> m;
        for (int i = 1; i <= n; ++i) {
            for (int j = 1; j <= m; ++j) {
                int a;
                std::cin >> a;
                std::cout << a + (a % 2 != (i + j) % 2) << " \n"[j == m];
            }
        }
    }

// Plz explain this line
//  std::cout << a + (a % 2 != (i + j) % 2) << " \n"[j == m];


Thank you folks.
  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    If (a % 2 != (i + j) % 2) this statement is true it will add 1 with a . And the statement means -->> a odd and (i+j) even -OR- a even and (i+j) odd.

    • »
      »
      »
      5 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      how does this syntax works << " \n"[j == m]; ?

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

        That's the equivalent of saying:

        if (j == m) cout << '\n';

        EDIT: Think of it this way:

        You are given a string of two characters ' ' and '\n', which is represented as " \n". Take the character at index [j == m]. Keep in mind that j == m yields either 1 (true) or 0 (false).

        Hope it clears it up.

      • »
        »
        »
        »
        5 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        if j==m it will print a new line otherwise a space

        • »
          »
          »
          »
          »
          5 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          got him man, he really writes few lines of code in his every soln..

»
5 months ago, # |
  Vote: I like it -28 Vote: I do not like it

upvote this comment if you too think today's contest was mainly based on simple observations only.

[please don't downvote to pull my leg]

  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    That's the case with most Div2 rounds nowadays, which is by no means a bad thing. In fact it's only true with A, B and C problems. Give D, E and F a go and you'll be proven wrong very easily. People of all levels get 1 problem to play with, while others stay far below/above their current level and in my opinion that is very well balanced.

    Problem solving is all about logical thinking and making observations, maths and algorithms are really the tools to execute the idea.

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

.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    sorry commented on the wrong blog entry. Ignore pls. It doesn't allow me to delete it now.