When submitting a solution in C++, please select either C++14 (GCC 6-32) or C++17 (GCC 7-32) as your compiler. ×

swapnil07's blog

By swapnil07, history, 2 years ago, In English

Warm greetings,

Newton School cordially invites you to be a part of our monthly coding contest. The challenge will go live on 28th January 2022 at 9 PM IST. Also, do register for Newton's Grand Coding Contest 2022 and stand a chance to win prizes upto ₹1,000,000.

Registration Link: Newton's Coding Challenge

You will be given 6 problems and 150 minutes to solve them. The contest will be rated for all!

The problems were written and tested by _Enigma__, ShlokG, and iLLusio.

We would also like to thank gkapatia for co-ordinating the contest.

Highlights of contest:

  1. The Prize Money for the top 5 performers are as follows:
    • First Prize: ₹10,000
    • Second Prize: ₹5,000
    • Third Prize: ₹2,500
    • Fourth Prize: ₹1,500
    • Fifth Prize: ₹1,000
  2. ₹100 Amazon gift vouchers to the top 50 participants.
  3. ₹100 Amazon gift vouchers to 50 randomly selected participants ranked between 51-500.

Note: Top 5 participants from other countries can opt to receive an Amazon Gift voucher in their respective currencies. All other gift vouchers will be sent in INR.

We hope you like the contest! Hope to see you all at the leaderboard! :)

Edit: The problems have been opened for practice and the editorials have been published.

Congratulations to the top participants:

  1. Gennady Korotkevich — tourist
  2. Ramazan Rakhmatullin — never_giveup
  3. Kalash Gupta — kal013
  4. Rahim Mammadli — Nots0fast
  5. Anay Karnik — AwakeAnay
  • Vote: I like it
  • +66
  • Vote: I do not like it

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

Is there an editorial for the Newton's Coding Challenge December 2021 ? here is the announcement : https://codeforces.com/blog/entry/98437 But I can't find any editorial.

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

I got this message when I tried to register.

Select College from given options only. If you cannot find matching College, please request for addition.

How long will it take for my college to be added? Are only graduates of those registered colleges allowed to participate?

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

What was the intended solution of K-star problem. I did some crap , looping over all nodes as roots. For each other, doing a BFS while keeping track of number of nodes in each root'child subtree, calculating via an k*(number of children of root) dp lmao.

Edit: And it passed.

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

    Yes, that seems like the intended solution. There are not that many feasible centers.

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

Got a WA(RTE) for problem C for submitting in Python3 instead of C++ lol!!

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

Please open problems for practice
I want to submit my solution for 4th problem.
Was stuck with some over calculation while travelling from parent to child.
Edit : Now problems are open for practice.

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

Is E mo's Algo + segment tree + binary search?

»
2 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).

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

Why are codes with debug template giving me WA? This is a really annoying thing, because I have to comment off them every time I submit and vice-versa.

Does anybody know any quick work-around for this, please let me know!

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

    Yeah, unfortunately if you are using

    Spoiler

    Then this wont work because the ONLINE_JUDGE is not set while compiling in their OJ.
    So maybe make some LOCAL flag set while compiling in your system and change above code to this

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

      Thanks for your answer, but I am using an online compiler, TIO. And, I don't know what LOCAL flag is set there. However, ONLINE_JUDGE flag is not set, and that helps in debugging.

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

          Wow, I didn't knew we set compiler flags like this. Thanks a ton, dude!