swapnil07's blog

By swapnil07, history, 3 years 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, _deactivated_, 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

    | Write comment?
    »
    3 years 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?

    • »
      »
      3 years 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.

      • »
        »
        »
        3 years 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 :)

    • »
      »
      3 years 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.

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

        Welcome.

      • »
        »
        »
        3 years 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.

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

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

          • »
            »
            »
            »
            »
            3 years 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?

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

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

    »
    3 years 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?

    »
    3 years 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).

    »
    3 years 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

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

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

    »
    3 years 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!

    »
    3 years 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:

    • »
      »
      3 years 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.

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

    Why is my submission showing internal error?

    »
    3 years 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.

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

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

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

    Capture

    »
    3 years 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 ?

    • »
      »
      3 years 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

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

    What about duration will it be extended?

    »
    3 years 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

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

    can say for first time codechef is better :)

    »
    3 years 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?

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

      yeah, I also have the same question.

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

      Yes please. The explanation contradicts the statement.

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

      They have updated the statement, now it looks alright.

      • »
        »
        »
        3 years 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??

        • »
          »
          »
          »
          3 years 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

          • »
            »
            »
            »
            »
            3 years 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.

    »
    3 years 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.

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

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

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

    I QUIT......

    »
    3 years 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.

    • »
      »
      3 years 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

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

      A contest well ruined

    • »
      »
      3 years 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.

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

    Codeforces orz!!

    »
    3 years 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.

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

    Please provide an explanation for the problem Games

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

      Thanks for providing the correct explanation in Sample Test Cases

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

    Internal error again

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

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

    »
    3 years 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.

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

    Thanks :)

    image

    • »
      »
      3 years 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.

    • »
      »
      3 years 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..

    »
    3 years 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.

    »
    3 years 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.

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

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

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

      For every submission there exists an equally annoying internal error

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

        That's the 3rd law... xD

        • »
          »
          »
          »
          3 years 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.

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

    The website and compilers are up and running

    »
    3 years 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.

    »
    3 years 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 ?

    • »
      »
      3 years 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.

    »
    3 years 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.

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

    How to solve Groot and the Groots?

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

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

    • »
      »
      3 years 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.

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

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

    • »
      »
      3 years 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.

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

        is it possible for you to share the code?

        • »
          »
          »
          »
          3 years ago, # ^ |
          Rev. 2   Vote: I like it +3 Vote: I do not like it
          C++ Code
          • »
            »
            »
            »
            »
            3 years 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
            • »
              »
              »
              »
              »
              »
              3 years 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.

              • »
                »
                »
                »
                »
                »
                »
                3 years 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.

        • »
          »
          »
          »
          3 years 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).

    • »
      »
      3 years 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

    • »
      »
      3 years 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

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

      i think this is modified BellmanFord..

    »
    3 years 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.

    »
    3 years 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.

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

    »
    3 years 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.

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

    Code still showing internal error.

    »
    3 years 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?

    • »
      »
      3 years 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

      • »
        »
        »
        3 years 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.

        • »
          »
          »
          »
          3 years 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

    »
    3 years ago, # |
      Vote: I like it +20 Vote: I do not like it
    1. How to upsolve?
    2. Looking forward to the editorial! <3
    • »
      »
      3 years 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.

      • »
        »
        »
        3 years 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.

    »
    3 years 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).

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

      sir when will participants get their gift Vouchers

      • »
        »
        »
        3 years 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.

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

          is that date postponed

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

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

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

            They will be announced by today.

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

              result announced?

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

              where?? did winners got some mails

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

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

              • »
                »
                »
                »
                »
                »
                »
                3 years 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.

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

                  gg

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

                  Which Tuesday???? xD

                  • »
                    »
                    »
                    »
                    »
                    »
                    »
                    »
                    »
                    3 years 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.

    »
    3 years 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.

    »
    3 years 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).

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

    how can i redeem my coupon??

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

      +1 same problem

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

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

      • »
        »
        »
        3 years 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)

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

      still not received yet

      • »
        »
        »
        3 years 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.

    »
    3 years 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).

    »
    3 years 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).

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

    Received the gift card today thanks :)

    »
    3 years 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

    • »
      »
      3 years 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.

    »
    3 years 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.