swapnil07's blog

By swapnil07, history, 5 months ago,

Warm greetings,

Newton School cordially invites you to be a part of our monthly coding contest. The challenge will go live on 28th December 2021 at 9 PM IST.

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, and Xzirium.

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 or through a Paypal transaction. All the other gift vouchers will be sent in INR.

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

• +51

 » 5 months ago, # |   -18 what is the meaning of sequence in question C ? is this a sequence [ 1,3,5] or its need to be contigeous ?
•  » » 5 months ago, # ^ | ← Rev. 2 →   0 It is basically an array of numbers or a series of numbers like {1,2,3}. It is not a segment.
•  » » » 5 months ago, # ^ |   -39 they should have mentioned it properly, got 2 penalties and a lot of time wasted
 » 5 months ago, # |   +1 Can't i register for the contest and enter the contest once the contest has started? i was giving round here on codeforces thats why didnt register and now i cant enter the contest :<
 » 5 months ago, # |   +3 Anybody has an edge case for D getting 14 out of 15 AC and 1 WA :(
•  » » 5 months ago, # ^ | ← Rev. 3 →   +3 Check the following test case 2 4060361101701000 10000000000000000 8788101400260000 10000000000000000 Answer should be, 1 1.
 » 5 months ago, # | ← Rev. 2 →   +2 How to solve problem D? (Find the number of pairs $A$, $B$ ($A < B$) such that $lcm(a, a + 1, .. b - 1, b) = x$I tried to handle cases up to length 5 $(B - A <= 4)$ and then brute force for bigger lengths.
•  » » 5 months ago, # ^ |   +2 Brute for all length > 2, then for 2 find by solving quadratic. Store for all lcm in map of vectors and then find using binary search.
 » 5 months ago, # |   0 Is E anything to do with solving XOR equation using Gaussian elimination or something?
 » 5 months ago, # |   0 What is the intended complexity for F?
•  » » 5 months ago, # ^ |   +14 I was able to solve it in $O(2^r r^2 \log mr)$
 » 5 months ago, # |   0 When can we expect the editorial, and what is the approach to solve question C (Anya's triplets)?
•  » » 5 months ago, # ^ |   +6 Sort the segments in the increasing order of endpoints. Then greedily pick c points from R to L for each segment. This works because, let Sj and Si be the segments such that j > i. As the segments are sorted in increasing order of end points, Rj >= Ri. Hence, if Sj and Si share the common points these points will lie close to Ri. Hence picking points from R to L is optimal. Coden = int(input()) store = [0 for i in range(n)] for i in range(n): a = [int(i) for i in input().split()] a[0],a[1] = a[1],a[0] store[i] = a store.sort() vis = [0 for i in range(2001)] for i in store: l = i[1] r = i[0] c = i[2] - sum(vis[l:r + 1]) for j in range(r , l - 1 ,-1): if c <= 0: break if vis[j] == 0: vis[j] = 1 c-=1 print(sum(vis)) 
 » 5 months ago, # |   +15 With great international coders also coming in, looking forward for an extended and revised Prize Distribution Criteria!