Warm greetings,
Newton School cordially invites you to be a part of our 3 year anniversary contest. The challenge will go live on 30th November 2022 at 9 PM IST.
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 dnshgyl21, _deactivated_, Sawarnik, Xzirium, and _Enigma__. We would also like to thank pradumangoyal and gkapatia for co-ordinating the contest.
Highlights of contest:
- The Prize Money for the top 5 performers are as follows:
- First Prize: ₹20,001
- Second Prize: ₹10,002
- Third Prize: ₹5,001
- Fourth Prize: ₹3,003
- Fifth Prize: ₹2,001
- ₹333 gift vouchers to the top 50 participants.
- ₹300 gift vouchers to participants with ranks 3, 6, 9, 12, ..., 333 (all multiples of 3 till 333).
- Top 999 students get INR 20001 off on all Newton School courses!.
- Placement opportunities with the top product companies for Indian participants.
See you all at the leaderboard! Happy coding :)
The round would clash with CodeChef Starters 67. Can this round be shifted to 29th November?
I'm definitely putting my name in the goblet
"Did you put your name into the Goblet of Fire, Harry?" Dumbledore asked calmly
Waiting...
HOPE THIS TIME PROBLEMS ARE SIMPLIER
Fingers crossed :P
Can you please post editorial link, or please make github repo which contains editorial of all the newton contest till now. Something like that, it will be helpful those for us those who try to upsolve the contest.
Your problems are good, but some I don't get the editorials that's why aggregating them in one github repo would be good idea ig.
That sudden increase in problem difficulty after problem 3 and the lack of editorial makes it very irritating for the participant. So these days I avoid this contest
The editorials will be released within a week. :)
Can u please provide the link for editorial?
Top 999 students get INR 20000 off on all Newton School courses!.
Please make it
Top 999 students get INR 20001 off on all Newton School courses!.
You asked it, we gave it! :P
Ok brb upvoting your comment with my alleged 3 accounts.
I have tried to register on the website for like 98054750943758034705 times but the OTP doesn't come. Is there something admins can do to help me out?
On the other note, I don't really understand why you need my mobile number. This is annoying experience.
Problem E has appeared before :)
Edit: Not claiming the problem is copied, just stating a fact.
It appears that E has appeared before. However I solved it myself today and would like to share my solution.
Map all numbers in the input to random numbers in a large range. The mapping should be done ensuring that the order of the numbers remains same after mapping. Now to compare two arrays, take their sum and product. If they are same then arrays are same. Other wise difference in sums will be the difference between the mismatched numbers and the divison of their products will be the divison of the mismatch numbers. Now solve for both numbers using these two equations. Both numbers must occur in their respsctive ranges and their positions should coincide. This last part can be performed offline after sorting the queries.
Any hint to solve B? I think this is the main idea (or I might be absolutely wrong), but could'nt implement.
Iterate over
1 <= i <= M
, and keepi
in the first index. Now for the restn-1
numbers, you can have numbers which have same bit set asi
. So, I can use__builtin_popcount()
to find number of set bits. But, here comes permutation and combination T-T and I got confused on how to keepm
numbers inn
elements(so for every other positions there are Count_Submask(i)-1 options. So (Count_Submask(i)-1)^(n-1) will be the answer for a particular i. Just add answers for all i till m.
If a number i has j bits set then there can be 2^j submask. For this question do remember to exclude 0. That's why I have taken count_submask(i)-1.
Man TT_TT, seems so easy once you confirm/prove your approach. Still couldn't implement it, gotta be better.
Also, how to solve these permutations problems, do you write down or have enough practice to just implement directly. Please suggest any resource where I can learn PnC important enough for CP. Thank youu!
how to solve C?
I used dp.
My dp had 3 states and dp[i][j][k]=number of subsequence such that the last index chosen from array is i , array b is j and array c is k. To do the transitions quickly I have used 2-d prefix sum. Sample code
Why we are getting TLE with 3d dp, with same states as yours. My code : Link
I used similar kind of dp but a more simplified form using inclusion exclusion. Code
do i have to apply for gift voucher somewhere if i am eligible for it ?
no you dont, it will be sent to your registered email.
Can anyone tell their approach for D problem, I am not getting any idea. Thanks for helping in advance.