pritishn's blog

By pritishn, 4 weeks ago, In English

CodeAgon is on 27th September 2020 at 20:00IST.
And I'm sure almost all Indian coders will participate in CodeAgon rather than CF Div1,Div2.

Please change the date for round #673. Otherwise many people will have to skip this round.

Please look into this, MikeMirzayanov .

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

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

antontrygubO_o , if you are the coordinator for the round. Please look into this matter.

»
4 weeks ago, # |
  Vote: I like it -68 Vote: I do not like it

for beginners it is better to participate in DIV2 rather than CodeAgon

PS
  • »
    »
    4 weeks ago, # ^ |
      Vote: I like it -60 Vote: I do not like it

    Most beginners don't even know about codeagon.

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

      Right ! So better they give DIV2 and enhance their skills

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

        Well, I can't deny this. But I feel like all expert+ coders should definitely try it out. ¯_(ツ)_/¯

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

          I have never given CodeAgon, should cyans even try it?

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

            Sure try.

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

              Let me rephrase. For a cyan, Div2 or CodeAgon?

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

            i know a coder with rating 1440 (almost) got selected in codeagon and got the job offer

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

      You are wrong ,instead beginners are the one ,who are sharing codeagon links throughout the WhatsApp, social platforms.

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

    I agree upto some fact, but atleast you will get experience for next time, as there are yearly two contest,

    also this time sadly platform has changed from hackerank to interviewbit, where we cannot use our own editor, so at least participation will get you some experience.

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

I think only 2021/2022 graduates will participate in codeAgon, others are ineligible for prizes and job offers

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

Eventhough its unlikely, I do hope it gets postponed by a day. I hate missing cf rounds lol

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

    I don't think timing will be changed anymore. Guess we'll have to miss it.

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

      They just change the date of a contest when some very bad internal error ocurrs. I don't know if whe should hope for that or not lol

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

yea, please do something i have not missed a round in more than two months and I also have to give codeagon. There may be many like me

»
4 weeks ago, # |
  Vote: I like it -129 Vote: I do not like it

For people wanting link codenation

»
4 weeks ago, # |
  Vote: I like it -18 Vote: I do not like it

i think you should personally message those officials of codeforces.

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

    Mike don't see my messages. :(

    And I don't know who are the coordinators of the round.

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

Please Don't postpone it. just prepone it to today or tomorrow. MikeMirzayanov

»
4 weeks ago, # |
  Vote: I like it -36 Vote: I do not like it

I fear if the round is not preponed/postponed, there will be very less participation, maybe as low as 1k-2k

»
4 weeks ago, # |
  Vote: I like it -17 Vote: I do not like it

When CF clashes with a long contest and you really want to do both, do both.

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

    It's not a long contest, it's a short contest

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

    It gives opportunity for job/intern at great company Codenation .

    It is super important exam. I know there is going to be a huge cheating scandal in this contest .Hope officials will do whatever possible to stop it . Hope ,Only deserving will get a chance.

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

      so they give tshirt for referralsss?

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

        Yes they do . Also around top 300 will get a chance for interview for job and internship in Codenation. That's great opportunity.

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

          Will the standings table be shown during or after the contest?

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

          Are you sure they will interview Top 300 ?

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

Someone recently asked to vary Codeforces round times but they were told that Codeforces focuses on the European and Asian users, so I don't think the time should be changed. You only have to skip one round, at least you live in a good time zone. Many people in Japan/North America have to skip rounds all the time because it is so early, and on the weekend at least there won't be school or work for them. Remember Codeforces is international not just India.

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

    Like its a loss from both side, isn't it. Lots of people won't be able to participate and its' a loss for both codeforces and the people. Don't deny the fact that most of the users are from russia and india, so they have customized the time in convinience of both of these countries. Therefore, japan/NA people asking for time change cannot be heard but indian people demanding may be heard. Think practically

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

    Why not have contests at different times rather than a standard time, this probably won't affect the quality participants(Not me) cause they love cp so much to give contest at any hour, competition is maintained and every nation might get a equal chance.

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

Think positive: there will be much less clarification requests. Help CF coordinators and round authors and participate in CodeAgon!

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

Why not ask to postpone codeagon.

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

    [Deleted]

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

      Doesn't mean it has more registers, so it is more important. For example, in IOI, only like top 350-400 qualify to the finals from the whole world. So that is only 350-400 registered users. But in fact, it is a very important contest.

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

        you are comparing apples with bananas.

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

        I got your point but after posting that comment there was no going back. So I guess I should bear all those downvotes. Thanks anyways for making things clear. Lesson learned. :)

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

    CF round is for personal improvement and satisfaction mostly, and one can get most of that experience by doing a virtual contest, while this test carries a lot more weigh for a lot of people since it can potentially get them internships and full time roles.

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

Just skip the round and do it as a virtual contest later? Less load on servers, smaller queues and less clarification requests

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

I'm not Indian, so I guess I won't be eligible for prizes, but would there be a live standings table? Just so I could have fun participating? :)

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

 codeAgon (-_-).

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

Me who rage quit the contest within 10 mins - ![ ](tenor.png) Translation — This is a high-quality insult.

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

Nice Div 1 round .

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

How to solve problems 3, 5, and 6?

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

    Same doubt XD

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

    5 was dp

    dp[i][1024]

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

      what is dp[i][j]?, One observation that I made was that for all k consecutive subsegments to have xor sum of 0, the k subsegment should repeat i.e. 1,2,6,1,2,6,.., where k = 3, somehow we have to choose the first k values such that total cost is minimum.

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

        I= guess dp[i][j] is minimum changes required to make the sequence k xor till i if I set value j at index i. Nice thought by someone who wrote this solution.

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

          How will you compute the transitions?

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

            That is the thing Bajrang_Pandey can answer I am thinking over it!

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

          Yes... actually iterate i till B, then if you set j at position i, then calculate the change by subtracting no of numbers equal to j at index i

          here i is effectively i%B

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

          The table is too large. 10^4*10^3 , 10^7 ordered table??!!! And also computing the transitions will timeout I guess?

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

            No it worked ! did you try it?

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

              No, i thought it may time out or show MLE.

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

            I also had the same doubt I don't know were tests weak or memory limits were not more also there were some details hidden in any problem b was becoming y sometimes d was becoming x and also they even can't clear that your solution run on multiple tests . I got confused for hours that Why I was getting WAs on 2nd direct and easy problem. As I was not clearing adjacentcy list thinking of only one Test Case or may be some other error.

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

              Not your fault brother. These problem statements clearly show how they didn't even bother to verify the problems.

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

    Was Q.1 Rerooting on dfs tree or something tricky I wasn't able to approach 1st

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

    Nice to see that everybody is on the same boat

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

    How to solve 1 and 2 ? Please 1 first.

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

      2nd was easy, count nodes with depth < B, say cnt... answer is $$$2^{cnt}$$$ % mod

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

      For 2nd all the nodes which are at max distance B from the root can chose their own colour because they have no Bth parent above them. Remaining nodes will just chose the colours based on the rule of alternate colours thus ans wer will be 2^(total number of nodes which are at most B distance from the root )%P;

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

    For problem 3:

    Let F(n,k) denote the number of distinct necklaces of n beads that can be made with at most k colours.

    Let $$$X_i$$$ be an Indicator Random variable which is equal to 1 if the $$$i^{th}$$$ colour is included in a necklace. So for a given necklace number of distinct colours = $$$\sum_{i=1}^{i=k}{X_i}$$$.

    We need to calculate $$$E[\sum_{i=1}^{i=k}{X_i}] = \sum_{i=1}^{i=k}{E(X_i)} = \sum_{i=1}^{i=k}{P(X_i=1)} = k*P(X_1 = 1)$$$.

    Now $$$P(X_1 = 0) = \frac{F(n,k-1)}{F(n,k)}$$$

    $$$ Ans = k * (1 - \frac{F(n,k-1)}{F(n,k)})$$$

    The value of F(n,k) can be be found here: https://en.wikipedia.org/wiki/Necklace_(combinatorics)