swapnil07's blog

By swapnil07, history, 5 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 link — https://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?
    »
    5 years ago, hide # |
     
    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?

    »
    5 years ago, hide # |
     
    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?

    »
    5 years ago, hide # |
     
    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 years ago, hide # |
     
    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

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

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

    »
    5 years ago, hide # |
     
    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!

    »
    5 years ago, hide # |
     
    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:

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

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

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

    Why is my submission showing internal error?

    »
    5 years ago, hide # |
     
    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.

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

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

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

    Capture

    »
    5 years ago, hide # |
     
    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 ?

    • »
      »
      5 years ago, hide # ^ |
       
      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

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

    What about duration will it be extended?

    »
    5 years ago, hide # |
     
    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

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

    can say for first time codechef is better :)

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

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

    »
    5 years ago, hide # |
     
    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.

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

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

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

    I QUIT......

    »
    5 years ago, hide # |
     
    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.

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

    Codeforces orz!!

    »
    5 years ago, hide # |
     
    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.

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

    Please provide an explanation for the problem Games

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

    Internal error again

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

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

    »
    5 years ago, hide # |
     
    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.

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

    Thanks :)

    image

    »
    5 years ago, hide # |
     
    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.

    »
    5 years ago, hide # |
     
    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.

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

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

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

    The website and compilers are up and running

    »
    5 years ago, hide # |
     
    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.

    »
    5 years ago, hide # |
    ← 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 ?

    • »
      »
      5 years ago, hide # ^ |
       
      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.

    »
    5 years ago, hide # |
     
    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.

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

    How to solve Groot and the Groots?

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

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

    • »
      »
      5 years ago, hide # ^ |
       
      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.

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

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

    • »
      »
      5 years ago, hide # ^ |
       
      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.

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

        is it possible for you to share the code?

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

              • »
                »
                »
                »
                »
                »
                »
                5 years ago, hide # ^ |
                 
                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.

        • »
          »
          »
          »
          5 years ago, hide # ^ |
           
          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).

    • »
      »
      5 years ago, hide # ^ |
       
      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

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

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

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

      i think this is modified BellmanFord..

    »
    5 years ago, hide # |
     
    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.

    »
    5 years ago, hide # |
     
    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.

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

    »
    5 years ago, hide # |
    ← 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.

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

    Code still showing internal error.

    »
    5 years ago, hide # |
     
    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?

    • »
      »
      5 years ago, hide # ^ |
       
      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

      • »
        »
        »
        5 years ago, hide # ^ |
         
        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.

        • »
          »
          »
          »
          5 years ago, hide # ^ |
           
          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

    »
    5 years ago, hide # |
     
    Vote: I like it +20 Vote: I do not like it
    1. How to upsolve?
    2. Looking forward to the editorial! <3
    »
    5 years ago, hide # |
     
    Vote: I like it -8 Vote: I do not like it

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

    »
    5 years ago, hide # |
     
    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.

    »
    5 years ago, hide # |
     
    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 years ago, hide # |
     
    Vote: I like it +18 Vote: I do not like it

    how can i redeem my coupon??

    »
    5 years ago, hide # |
     
    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 years ago, hide # |
     
    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 years ago, hide # |
     
    Vote: I like it +7 Vote: I do not like it

    Received the gift card today thanks :)

    »
    5 years ago, hide # |
     
    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 years ago, hide # ^ |
       
      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 years ago, hide # |
    ← 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.