swapnil07's blog

By swapnil07, history, 2 months ago, In English

Edit: The gift vouchers have been sent to all the participants. The top 5 participants will receive an additional mail with their prizes soon.

Edit: The prize winners have been announced on the Newton School Contest Page. Please click on the star icon next to contest details for the information corresponding to the winners. The gift vouchers will be sent to the prize winners by Friday next week (17.09.2021).

Edit: The editorials have been published here.

Hello Geeks!!!

Assemble to compete with India’s coding community like never before! Newton School’s Grand Coding Contest will be based on the Avengers theme, so it will not only be fun but plotful too!

Contest linkhttps://bit.ly/3Dau2ZI
Date — 27 August 2021 (Friday)
Time — 9 PM
Duration — 2.5 hours

You will be given 8 problems and 150 minutes to solve them. The contest will be rated for all!
The problems were written and tested by dnshgyl21, Lubba_Lubba, Sawarnik, _Enigma__, and swapnil07.

Highlights of the contest

Prizes

  • Cash prizes worth up to ₹ 5 lakhs
  • The first prize winner gets ₹50,000
  • Second Prize — ₹ 25,000
  • Third Prize — ₹15,000
  • Fourth Prize — ₹10,000
  • Fifth Prize — ₹10,000
  • Gift Vouchers

  • Get a chance to take home HomePod Mini, Ergonomic Keyboard and Mouse, Amazon Echo, and much more by solving at least one question correctly — randomly chosen winners
  • Amazon gift vouchers worth ₹500 for top 100 coders
  • Amazon gift vouchers worth ₹100 for coders ranked between 101 — 500
  • Amazon gift vouchers worth ₹100 to 1000 random coders ranked above 500 who solve at least one problem
  • New Special Prizes

  • For each problem, the first participant to solve the problem correctly will receive ₹1000 Amazon gift voucher.
  • All the participants completing the entire problem set will receive ₹2000 Amazon gift voucher.

    Note: For international participants, the corresponding equivalent Amazon gift vouchers will be sent to the winning participants!

    Participants
    Over 50,000 Participants

    Job Opportunities
    Over 300 Hiring Partners Across India!

    Good luck, coders! Hope to see you on the leaderboard!

    Edit:

    Congratulations to the top participants:

    1. Ramazan Rakhmatullin — never_giveup
    2. Kevin Sun — ksun48
    3. Kalash Gupta — kal013
    4. Jatin Yadav — jtnydv25
    5. Nikita Golikov — golikovnik
  •  
     
     
     
    • Vote: I like it
    • +38
    • Vote: I do not like it

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

    Why is the site demanding my personal phone number? Is a phone number really necessary to participate in a programming contest?

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

      So that they can call you everyday to sell their courses.

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

        I am already suffering from unacademy calls, I don't want another one :)

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

        True that

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

      We apologize for the inconveniences caused. We have taken your feedback, and will try to incorporate it from the next instances.

      Thanks for your valuable feedback.

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

        Welcome.

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

        I’ve tried to register multiple times, and the site repeatedly tells me that my phone number is invalid. I’m not sure what the issue is, but it makes it impossible for me to register for the contest.

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

          We have fixed the issue, apologies for the inconveniences caused!

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

            I’m not sure the fix went through; I’m still having the same issue. Is anyone else able to sign up using a US phone number?

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

              Hey, we have rolled another fix. Can you please check?

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

      LOL

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

    Over 50K participants! o__O That's impressive! The most popular Codeforces contests barely get to 30K.

    I wonder what the problem complexity range would be approximately, in terms of Codeforces units… Anyone can tell?

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

    Auto comment: topic has been updated by swapnil07 (previous revision, new revision, compare).

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

    Will you people also provide the solution or the editorials of the problems/tasks after contest?? Please try to do that. It will be very beneficial

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

      We will provide the editorials for this round! They will be provided within few days!

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

    Is there a penalty for resubmission if all the submissions pass?

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

    no way there can be 50k registrations, It's a trap!
    just saw the difficulty(too easy) of first question and it's AC(too low out of 50k)
    codeforces is the best!

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

    53K registrants and merely 5K appeared for the test.. This stat is quite disturbing. I think you guys really have to look why this happened after so much promotion and around 69 emails sent per day to each of the participants for the last few months. :kekw: :kekw: :kekw:

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

      Maybe people didn't want to share their personal phone number while registering.

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

    Why is my submission showing internal error?

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

    Hey is there a problem with the OJ? My submission has been running for sometime and now shows internal error. Please look into it.

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

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

    Why I am getting Internal error in the 3rd problem?

    Capture

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

    "Sorry for inconveniences caused. Site is under maintenance. Servers will be up soon." So when ?

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

      Sorry for inconveniences caused. The website is under maintenance. Servers will be up soon. We have increased the contest time by 20 minutes. We will re-run all the submissions that ended up with Internal Server Error

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

    What about duration will it be extended?

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

    Newton School’s Grand Coding Contest will be based on the Avengers theme, so it will not only be fun but plotful too!

    And the plot thickens

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

    can say for first time codechef is better :)

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

    Can you please elaborate a bit on problem statement / sample explanation of Games?

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

      yeah, I also have the same question.

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

      Yes please. The explanation contradicts the statement.

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

      They have updated the statement, now it looks alright.

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

        What happens for sample test when allowed subset is {0,1}. Natasha starts from 0, goes to 1. then why can't Scott go from 1 back to 0 again??

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

          We cannot go back to a visited state so how can he go back to 0

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

            When subset is {0}, why can't we start with 1? It would be great if you could elaborate a bit if you're clear with the statement.

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

              As far as I understand, if by subset {0} you mean the set given in the question, that's fine you can start with 1. Their explanation was based on which numbers you can start from actually, in the update they wrote it as non blocked subsets, by that logic it was fine.

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

    Honestly, it is really frustrating. 50k registrations and you guys are not even able to manage 20k submissions.

    Just to remind everyone, Facebook Hacker Cup starts in another 2 minutes.

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

    I've been getting internal errors for half an hour now.

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

    I QUIT......

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

    "We will re-run all the submissions that ended up with Internal Server Error".

    Please don't do this, we are submitting, again and again, to check whether the submissions are getting accepted without internal error :( ... otherwise, a lot of penalties will be added.

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

      i did thrice if my code gets WA i get 30 min penalty :D

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

      A contest well ruined

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

      Stop doing that, work on other problems instead. Your submissions just making queue bigger. And anyway they should rejudge all failed submissions to capture the time of the first successful submit.

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

    Codeforces orz!!

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

    I was surprised that my Rank was not moving for about 15-20 minutes and I was wondering that whether so many people gave up so quickly or not... And I thought that Internal Error meant something equivalent to TLE or RTE, and I was sure that RTE won't be there so I assumed TLE... Wow, this was a nice experience, they could have asked CodeChef or CodeDrills to hold their beer(contest), no shame in asking others if u can't handle something rather than live experimenting.

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

    Someone please notify when the error will be resolved till then ill try FB contest!

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

    Please provide an explanation for the problem Games

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

      Thanks for providing the correct explanation in Sample Test Cases

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

    Internal error again

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

    long queue :( and internal error again. Really a grand contest!!

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

    I am still getting the internal server error even after one and a half hour of submitting solutions. This contest should be annulled.

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

    Thanks :)

    image

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

      I too faced the same error. Hope you guys will re-run all such submissions.

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

      I guess you missed the test case in which only 1 node is present. I too faced the same error..

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

    I came back after solving three problems on FB hackercup to check if the internal error was resolved but unfortunately, this issue is still persisting. I think it's a good idea to leave the contest now.

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

    If the contest is extended once more the duration would be equal to code jam world finals xd.

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

    Law of internal error is also called Newton's first law.

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

      For every submission there exists an equally annoying internal error

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

        That's the 3rd law... xD

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

          No, it is newton's 4th law, today was the grand release of this law. All these issues are just a part of this mega event.

    »
    2 months ago, # |
    Rev. 3   Vote: I like it +38 Vote: I do not like it
    Pro tip
    »
    2 months ago, # |
      Vote: I like it 0 Vote: I do not like it

    The website and compilers are up and running

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

    LOL... The same code passes 10 test cases in the first submission and again it pass 12 test case in the second submission.

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

    swapnil07 What details do we need to provide to recieve Amazon Vouchers ?

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

      I received an amazon voucher several months ago from them. Didn't have to provide any details.

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

    lol , you can't even manage to judge submission of 5k people and you have over 50k participants.

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

    How to solve Groot and the Groots?

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

    How to solve 4th problem (Problem name: Games)?

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

      Find number of subsets when $$$k$$$ is even. Natasha will win if and only if unblocked states with odd parity is greater than unblocked states with even parity. Iterate over number of blocked states with odd parity. Some algebra and counting is left afterwards. Do the same for odd $$$k$$$ and add them.

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

    Was C some modified dijkstra? Didn't get a chance to submit.

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

      Yeah, a Dijkstra with two dimensions — one for the node, and another for the amount of edges that you have gone through.

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

        is it possible for you to share the code?

        • »
          »
          »
          »
          2 months ago, # ^ |
          Rev. 2   Vote: I like it +3 Vote: I do not like it
          C++ Code
          • »
            »
            »
            »
            »
            2 months ago, # ^ |
              Vote: I like it +1 Vote: I do not like it

            I wonder why this doesn't work. If someone could point out why, it would be great! Priority Queue States: <Vertex, Distance, Number of nodes visited until now>

            Graph is stored in list: <node, weight>

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

              You should use $$$dis[vertex][numberOfNodesVisited]$$$ instead of $$$dis[vertex]$$$. In an example like:
              3 4
              1 2 2
              1 3 10
              2 3 2
              3 4 5
              The optimal path from 1 to 3 is 1->2->3. But from 1 to 4 it is optimal to use 1->3->4, not 1->2->3->4.

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

                Extremely sorry for the late reply! Thank you so much for the test case, I understood.

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

          When I think about it now, Dijkstra was unnecessary and the DP from the comment below is faster (we can avoid it because we increase the edge counter every time, so we can't have cycles).

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

      Did it with $$$DP[v][l]$$$ = min cost to reach $$$v$$$ from source using $$$l$$$ edges

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

      Here is another problem using same idea if you want to practice. link

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

      i think this is modified BellmanFord..

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

    If the submissions with internal error has been rejudged ?? My submission still shows me that and still the result has been shared.

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

    Why can't we submit our code post contest? It shows that the problems are locked. I would like to submit my code to check it's correctness as I didn't get the chance to do so during the contest.

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

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

    Please enable submissions after the contest so that we can upsolve the rest of the problems.

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

    Code still showing internal error.

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

    Is there anyone who got Runtime Error(NZEC) on problem C(homecoming) and whose code after making changes was later accepted? If yes could you tell what kind of changes did you make?

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

      Decalare the array global because the array size you are trying to create is n*n which for larger n like 3000 is out of local array size limit

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

        Thanks for the response. Is this problem specific to that platform because I think its possible in codeforces.

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

          I don't know the exact limit but in general for array size greater or equal 1e6 even codeforces gives runtime error, So i usually create array global for size 1e6 or either use an vector

    »
    2 months ago, # |
      Vote: I like it +20 Vote: I do not like it
    1. How to upsolve?
    2. Looking forward to the editorial! <3
    • »
      »
      2 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      The problems are available for practice. The editorials will be uploaded by the end of the week.

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

        Are they? I don't have run on hidden tests button for this contest.

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

    Auto comment: topic has been updated by swapnil07 (previous revision, new revision, compare).

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

      sir when will participants get their gift Vouchers

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

        All the prize winners will be announced by Friday, and the prizes will be rolled out in less than a week from then.

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

          is that date postponed

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

          Please provide us with some update. It's Saturday now.

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

            They will be announced by today.

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

              result announced?

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

              where?? did winners got some mails

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

              Tareek Pe Tareek Tareek Pe Tareek.... Aakhir kab karoge declare

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

                There's a delay in the the announcement. They will be announced by Tuesday midnight. Thanks for your patience, but downvoting setter's comment, I am not sure how valid it is.

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

                  gg

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

                  Which Tuesday???? xD

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

                    You can check the Prize winners list by going on this link And clicking on the star next to Newton's Grand Contest 2021 contests
                    PS : I don't know if it's final list
                    UPD : List is final.

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

    My name doesn't come up when I filter by institution on the leader board, I have set it up on my profile page. It's hard to find my own rank.

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

    Auto comment: topic has been updated by swapnil07 (previous revision, new revision, compare).

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

    how can i redeem my coupon??

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

      +1 same problem

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

      Are coupon codes sent? I haven't received it yet.

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

        i also haven't received any coupon code yet , i found my name in winner list , that's why i asked how to get the coupon code or redeem it.

        upd: i have received today(17 Sep)

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

      still not received yet

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

        Were you eligible ? Because I have got it and maybe a few others as well.

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

    Auto comment: topic has been updated by swapnil07 (previous revision, new revision, compare).

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

    Auto comment: topic has been updated by swapnil07 (previous revision, new revision, compare).

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

    Received the gift card today thanks :)

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

    I'm not the one to complain, but it says that international participants will receive corresponding equivalent Amazon gift voucher, however I got the one in Indian currency. I'm aware that in my country there is no Amazon website, but for example using amazon.de is more appealing than amazon.in

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

      We'll send the vouchers for top 5 participants in their respective currencies. Due to logistic issues, we could not roll out common gift vouchers in foreign currencies.

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

    Have all the gift cards distributed? I haven't recieved mine. I mailed them as well but no one has replied yet.

    UPD: Got it now.