### Ashishgup's blog

By Ashishgup, history, 4 months ago,

Hello Codeforces,

I am happy to invite you to the Final Round of GeeksforGeeks's Code India Code.

We don't want to exclude passionate programmers from enjoying the problem set of the final round. Therefore, the contest will be open for all users but only participants who passed in the Qualification Round held on 6th March will be eligible for the rewards.

Contest Details:

• Finals Link: (Register Here)
• Time: Thursday, 10 March 2022, 7:30 PM to 10:00 PM IST.
• Number of Problems: 7 problems
• There will be no penalties for wrong submissions.
• Tie Breaker: Time to reach X points. (ie, time of last AC solution)

Prizes:

• Rank 1: Macbook Pro + Course voucher worth INR 12,000
• Rank 2: iPad Air + Course voucher worth INR 7,000
• Rank 3: Smart Watch + Course Voucher worth INR 3,000
• Rank 4-25: Tablets + Course Voucher upto INR 1500
• Rank 26-100: Noise Earbuds + Course Voucher upto INR 1500
• Rank 101-200: Noise Smartbands + Course Voucher upto INR 1500
• Additional Reward for top 1000 participants: Free access GeeksforGeeks Premium Plus (Quarterly membership) with which you get: Access to ad-free content, Personal notes, free access to Doubt-Assistance program.
• Prize distribution is limited to those residing in India only.

Problem Setting Panel:

Even though the prizes are only for Indians, I would like to invite others to participate — the problem-set contains interesting and challenging problems, with an estimated difficulty of a Div2 — Div1.5 round.

Good luck everyone. See you on the leaderboard!

• +36

 » 4 months ago, # |   0 Can I participate, even I didn't participated in earlier rounds?
•  » » 4 months ago, # ^ |   0 Yes.
•  » » » 4 months ago, # ^ |   -12 GeeksforGeeks round 2 was on 10th March.Coding Ninjas CodeKaze round 2 was on 13th MarchCodekaze has more than 10 times participants than GeeksforGeeks Code India Code.Codekaze has much more prizes than GeeksforGeeks Code India Code.But despite all this Coding Ninjas declared the result of final round and sent mail. And soon within 1-2 days they will send prizes. On the other hand GeeksForGeeks is doing ....?And not even replying participants.Hope this better describes the difference between 2 platforms GFG and Coding Ninjas.
•  » » » » 4 months ago, # ^ |   +4 Yeah, really impressed with coding ninjas . From Today onwards , I will Try to participate in Their weekend contests regularly .
•  » » » » 4 months ago, # ^ |   +14 Problems of this GFG contest are more interesting than CodeKaze.
 » 4 months ago, # |   0 where did we find qualification round problem's solutions because those problems are really very challenging awesome and pretty hard also.
•  » » 4 months ago, # ^ | ← Rev. 2 →   0 here for qualification round problems.
•  » » » 4 months ago, # ^ | ← Rev. 2 →   0 where is solution it is just problems?
•  » » » » 4 months ago, # ^ | ← Rev. 2 →   0 here for video analysis, editorial coming soon.
 » 4 months ago, # |   +33 Any idea about which tablets for rank 4-25?
•  » » 4 months ago, # ^ |   +173 pain killers.
 » 4 months ago, # | ← Rev. 2 →   -157 "only participants who passed in the Qualification Round held on 6th March will be eligible for the rewards."Can This be relaxed?(the qual round was basically solving one <=div2c problem but I missed the contest)Someone who do perform well in finals has skill to clear qualification round anyways
•  » » 4 months ago, # ^ |   -24 May be Div2 A for you but it was not at all Easy.
•  » » 4 months ago, # ^ |   0 I think even the easiest contest problem was way harder than a DIV2A.
•  » » 4 months ago, # ^ |   -45 It clearly was not just a div 2 A problem when a CM solves B,C,D and fails to do the A problem. wink
 » 4 months ago, # |   +81 The contest clashes with both Educational Round 124 and Reply Challenge. Is it possible to reschedule the contest?
•  » » 4 months ago, # ^ |   +31 Yes please, I can only brick so many contests at once
•  » » 4 months ago, # ^ |   +40
•  » » 4 months ago, # ^ |   -58 +1
 » 4 months ago, # |   +5 Any updates on changing the timing? These timings should be discussed before checking all the major websites like codeforces, codechef and atcoder
 » 4 months ago, # |   +14 In Leaderboard, only trusted participants(who solved >=1 problem in qualification round) are present or everyone who took part is present?
•  » » 4 months ago, # ^ |   +4 Omja ??
•  » » » 4 months ago, # ^ |   +9 Everyone who took part is currently on the leaderboard.
•  » » » » 4 months ago, # ^ |   0 Just a small doubt, Whether prizes will be given according to global rank or rank among the Indian participants?
•  » » » » » 4 months ago, # ^ |   +4 top X ranks among the Indian participants.
 » 4 months ago, # |   +26
•  » » 4 months ago, # ^ | ← Rev. 2 →   +11 reply from gfg: we only see numbers modulo 982345143764, so there seems to be no problem here.
•  » » 3 months ago, # ^ |   0 Hi koderkushy, elements of vector are by default 0. So, you need not use it.
 » 4 months ago, # |   +20 In the problem Path Function, why are constraints on the number of queries (q) not mentioned?
 » 4 months ago, # |   -51 jtnydv25 T-T
 » 4 months ago, # |   +5 Would someone like to exchange a smartband with me for earbuds?
•  » » 4 months ago, # ^ |   0 Me
 » 4 months ago, # |   0 Plz share your ideas or solution on how you solved or approached the problems. It will be very helpful. Thanks in advance.
•  » » 4 months ago, # ^ |   +3 Can anyone give some hint for 4th one?
•  » » » 4 months ago, # ^ |   +13 I can tell you about a $O(N)$ solution.Firstly let us rewrite the asked value $abs( x*ar[y] - y*ar[x] )$ {Now since in problem it is given that ar[i]%i==0 we can substitute ar[x] by $k.x$(k is a constant) , similarly we will replace ar[y] by $d.y$ (d is another constant)}=abs(x*y*d-x*y*k) = $abs(x*y*(d-k))$This shows that for any fixed d and k the best answer will be given by the lowest values of x,y possible.Now ignoring the above equation for some time, we change our focus. What can be he maximum number of distinct values of $ar[i]/i$ It is $√N$.Using this observation about the maximum number of distinct value we can brute force for all possible pair of values.
•  » » » » 4 months ago, # ^ | ← Rev. 2 →   +8 Really nice soln. I missed it and ended up overkilling it using convex hull trick. It solves this problem in $O(nlogn)$ and $i$ divides $a_i$ constraint isn't required.Just one correction regarding time complexity, no of distinct values of $ar[i]/i$ is $O(\sqrt M)$ where $M=10^6$, maximum possible value in the array. For small enough $n$ we can create a testcase with $O(n)$ distinct such values, so resulting time complexity would be $O(n*\sqrt M)$, overall $O(N*\sqrt M)$, where $N=10^5$ is sum of values $n$ across all testcases.Looking at constraints, it is an intended soln. Worst case generatorT = 100 N = 1000 M = 10**6 print(T) for _ in range(T): b=[ (M//i) for i in range(1,N+1)] a=[ (M//i)*i for i in range(1,N+1)] # print(len(set(b))) # print(len(set(a))) print(N) print(*a) 
•  » » » » 4 months ago, # ^ |   0 Can you explain a little bit how the maximum number of distinct values is sqrt(n)?
•  » » » » » 4 months ago, # ^ | ← Rev. 3 →   +9 The value of $A[i]/i$ when $i \geq 1000$ will be less than <= 1000 (since A[i] <= $10^6$). Thus, the number of different values is at most 1000. The number of different values when $i < 1000$ is at most 1000. So, in total, the maximum number of distinct values would be 2000.
•  » » » 4 months ago, # ^ |   0 Alternatively, Assuming 1-indexing, For a fixed i, find j such that a[j] / j is closest to a[i] / i where j < i. You need to check only 2 such values from the set.
 » 4 months ago, # |   +6 Hey there,I know they have provided a video solution for the contest but I am stuck on problem D which hasn't been covered in the video solution. Could anyone please give me some hint or approach? Thank you.
•  » » 4 months ago, # ^ | ← Rev. 3 →   +9 D was based on pigeonhole principle. SpoilerRewriting equation |x*a[y]-y*a[x]| as x*y*|(a[x]/x-a[y]/y)|.In case of n>=2000 answer will be 0.Since maximum distinct value of ratio, a[i]/i, will be less than 2000 so there must be two index x and y where a[x]/x=a[y]/y so in that case |x*a[y]-y*a[x]| =x*y*|(a[x]/x-a[y]/y)|= 0. For n<2000 brute force
•  » » » 4 months ago, # ^ |   +4 Can you explain a little bit about how the maximum distinct value of a[i]/i will be less than 2000 always. Did you get this value 2000 by checking for some big test cases,or, is it some intuition based. Please tell me what I am missing. Thanks
•  » » » » 4 months ago, # ^ |   +11 We have a[i] <= 1000000 for all values of i. Now for i >= 1000, we can clearly a[i]/i <= 1000 because of the constraint a[i] <= 1000000. So between the indexes 1000 and 2001 , you have only 1001 distinct values of a[i]/i but there are 1002 indices so some value of a[i]/i has to repeat. So for n>=2001 we can guarantee that the answer is 0. I thing we can reach n>=2000 also using similar line of thought.
 » 4 months ago, # | ← Rev. 3 →   +13 Minimize maximum elements can be solved by https://oeis.org/A036990 this series. During the contest, I wrote a brute force solution for n up to 10 and searched that series on OEIS and found the above series, but sadly I wasn't able to finish the code during the contest.
 » 4 months ago, # |   +8 What was the solution for problem Path functions?
•  » » 4 months ago, # ^ |   +27 Trick 5 and 6 hereLooking at constraints I feel the intended soln is generating all $2^{20}$ possible basis (using just trick 6) and then doing TRIE+DFS maintaining subtree size for each query. But its solvable even for $w <= 10^{18}$ (and easier to code), adamant comment explains how to find kth largest/smallest no using basis. (Thanks, Utkarsh_Agarwal852 for bumping this comments in recent actions a few weeks ago ;) ) [Code] Finding kth minimum using basis // b is set of basis auto solve=[&](lli v,lli k){ sort(all(b)); for(auto x:b) v=min(v,x^v); k--; for(lli i=sz(b)-1;i>=0;i--){ v=min(v,v^b[i]); if(k&(1LL<
•  » » » 4 months ago, # ^ | ← Rev. 2 →   +22 you got a good solution ..and i get added as a friend..deal :) ?
•  » » » » 4 months ago, # ^ |   +43 You got him a tablet and you're satisfied only by being added as a friend, I wouldn't have settled for anything less than a smartphone at least.
 » 4 months ago, # |   +36 When will the rank winners list be announced?
 » 4 months ago, # |   +3 How to solve the third problem (Two Strings)?
•  » » 4 months ago, # ^ |   +3 Video editorial is already published : https://youtu.be/Gjj4V-sjeFo
 » 4 months ago, # |   +74 Prize distribution/results when?
 » 4 months ago, # |   -22 GeeksforGeeks round 2 was on 10th March. Coding Ninjas CodeKaze round 2 was on 13th MarchCodekaze has more than 10 times participants than GeeksforGeeks Code India Code.Codekaze has much more prizes than GeeksforGeeks Code India Code.But despite all this Coding Ninjas declared the result of final round and sent mail. And soon within 1-2 days they will send prizes. On the other hand GeeksForGeeks is doing ....?And not even replying participants.Hope this better describes the difference between 2 platforms GFG and Coding Ninjas.
•  » » 4 months ago, # ^ |   +24 Hi! I was the problem setter for this round! If you have any issue with the quality of problems or any problem-related stuff, only then tag me.And I believe the leaderboard is final; we have removed the cheaters, you can find your rank here.
•  » » » 4 months ago, # ^ | ← Rev. 2 →   0 No, all problems were nice. And sorry for tagging you.GeeksforGeeks admin is not replying not even in mail he/she just vanished not even sent a single mail for ranklist or prizes related things.
 » 4 months ago, # |   +3 Will the contestants above rank 200 be included under 200 after removing overseas particpants. Ashishgup Omja
•  » » 4 months ago, # ^ |   -16 They have not finalized leaderboard in 8 days and so, what else you can expect from them. Don't take any GFG course ever because their doubt support assistance works in the same way they don't even reply. And never expect some prize from GFG.
 » 4 months ago, # |   +12 I'm actually quite curious to know how did namangoyal198 managed to cheat his way to the global rank 3 by beating so many ultra-skilled participants. Kudos to GFG team for catching him though.
•  » » 4 months ago, # ^ |   0 Maybe he was removed from leaderboard because he has not given/qualified round 1.
•  » » » 4 months ago, # ^ |   +6 No, we had removed him for plagiarism. The users who hadn't participated in the Qualification round are still on the leaderboard xD
•  » » » 4 months ago, # ^ |   +1 I doubt that, can you find these non-Indian LGMs on the qualification round ranklist: hitonanode and nirjhorjr ?Still, a stable newbie beating LGM's is quite fishy anyways (unless he is that mysterious anime character who was waiting for this day to unleash his true potential)
 » 4 months ago, # | ← Rev. 3 →   +20 11 Days passed we haven't got a single mail for conformation of prizes. Although GeeksforGeeks sends spam mails daily to participate in this/that event buy this/that course but when it come for prizes you ghost. Atleast please reply if it will take some time you should not ghost.
 » 4 months ago, # |   +3 Anyone else got a message to claim your prizes and then a message to ignore the previous email.
•  » » 4 months ago, # ^ |   0 I just got the message the claim to claim the prize but nothing of sorts of ignoring the previous mail.
•  » » » 4 months ago, # ^ |   0 The next message about ignoring the previous mail came at 6:49 pm (IST) to my email address.
•  » » » » 3 months ago, # ^ |   0 Yes I got that too and hence did not bother filling up the form...But then onwards they sent no further mails regarding the prizes...
•  » » 4 months ago, # ^ |   +9 It's probably because they used a wrong ranklist to give out prizes. I got a somewhat similar mail too, but that was because they earlier told me my rank was 3, but it was 4 instead (so the prize changed).
•  » » 3 months ago, # ^ |   +3 After they sent the mail asking me to ignore the previous mail, today they sent a mail regarding course voucher. Did you get the mail regarding the prize?
•  » » » 3 months ago, # ^ |   +6 Didn't get the mail for the course voucher either. T.T
•  » » » 3 months ago, # ^ |   0 I too recieved the 3 month premium free plan and that message asking to ignore the previous mail...But then onwards no further communication has been made from their side regarding the prizes....Seems like they are ghosting us
 » 3 months ago, # |   0 I solved 2 out of 3 programming questions and didn't even open the quiz part yet I got 3 months premium plus membership for free.Thanks a lot :)
•  » » 3 months ago, # ^ |   0 There was a quiz part?
•  » » » 3 months ago, # ^ |   0 Sorry, I didn't notice it is code india code blog and not job-a-thon blog.
 » 3 months ago, # |   +20 Is there anyone I can email or contact regarding my prizes?
•  » » 3 months ago, # ^ |   -7 No, GeeksforGeeks doesn't have this kind of facility. If you will mail then don't expect any reply so better don't mail.
 » 3 months ago, # |   +15 Are you planning to give prizes or not ?You just ghosted after contest no reply at all.Learn from other platforms.You can increase your audience by lots of promotion but you are definitely loosing many because of this trust related issues and you customer support.
•  » » 3 months ago, # ^ | ← Rev. 2 →   +14 Some people have already started receiving prizes. Anyway, I am not associated with the prize distribution or logistics part of it — my job was to admin the contest, so I'm sorry about being unable to help there. I will try to raise the issue and have the GFG Admin reply instead.
•  » » 3 months ago, # ^ |   +3 They sent a mail on the 21st about the goodies but after 10 mins they sent another mail telling us to ignore it...From then onwards no further communication has been made regarding the prizes...Seems like they ghosted everyone
•  » » 3 months ago, # ^ |   +6 Did anyone received their prize? I got a mail for filling address details on 31th march but still did not receive my prize. GeeksforGeeks_admin can you please look into it.
•  » » » 3 months ago, # ^ |   +12 Same except that I didn't even get the email.
•  » » » 3 months ago, # ^ |   +20 I got my prize but instead of Noise Earbuds, I received Boat Earbuds.
•  » » » » 3 months ago, # ^ |   0 How??? Where did you fill up your contact details? We did not get any mail informing us to submit our details for getting the prizes
 » 3 months ago, # |   +32 Now after almost 1.5 months I have not received my prize and a single mail about my prize. Atleast pls inform us about the status of the prizes.
•  » » 3 months ago, # ^ |   +13 They ghosted everyone dude... Idk from where some people got their prizes but 99% of the deserving candidates have not got it till now.. Sets a really bad reputation for gfg.
•  » » 3 months ago, # ^ |   +9 Same bro. Have almost given up on them.
 » 2 months ago, # |   +8 anyone got their prize?
•  » » 2 months ago, # ^ |   +13 Yes I did. A couple of weeks back.
•  » » 2 months ago, # ^ |   0 Yeah...got a delivery agent suddenly deliver the smartwatch one day without any prior intimidation..
•  » » » 7 weeks ago, # ^ |   0 same, but i get absolutely terrified when delivery agent start intimidating me.