Hello World!
Whether you're a beginner, a pro, or somewhere in between, Coding is always for everyone. No //comments about it, so let’s spice things up with a coding contest. NITS HACKS 5.0 is back in association with Coding Club NIT Silchar, traversing you to an Inter College Coding Competition to develop your coding, real problem-solving abilities, and experience worth remembering.
The coding competition is open to all undergraduate programmers in India, although everyone is encouraged to participate in it. It will be split into preliminary and final rounds according to ICPC guidelines.
20 teams (Top 15 teams and 5 NITS teams) will be invited to participate in the on-site final round. These teams will be given travelling expenses (up to 1K INR per person), accommodation, local hospitality, and basic facilities by the institute.
Rules:
- A team of 2-3 members from the same college is required to participate in the contest.
- An eligible individual may join only one team.
- Each participant must have a Codeforces account.
- A team must be created in Codeforces comprising of the members.
- Finally, you should register for the contest using the formed team.
- The team must also register in the provided Google form, failure to do so will result in the team's disqualification.
Registration and Contest Link:
Click on this link to register yourselves. You won't be considered an official participant if you don't register here. You also have to register in the Codeforces contest for taking part.
https://forms.gle/kdJuqzaa6fdpQG7r7
Contest Time:
The Preliminary round will be on 6th October 2022 at 20:00 IST and the Final round will be held on 22nd October 2022.
Contest Link:
Click on the link below to take part in the contest. Registration for the contest will start 6 hours before the contest.
https://mirror.codeforces.com/contestInvitation/0852873e5f538aef15f1017f1bcc3a198069e520
Finally, I'd like to thank my friends agarwala2512, Noobabhi, qu_bit, and jac_nikola for setting and testing the problems.
See you on the leaderboard.
UPD1: Registration has started.
UPD2: Standings will be frozen on the last 30 minutes and problems won't be in sorted order.
Can High school students participate as a team unofficially?
"The coding competition is open to all undergraduate programmers in India, although everyone is encouraged to participate in it".
From what I understand, there does not seem to be any bar on unofficial participation.
Yes
Great to see that we're going big this time.
Good luck to all the participants and wishing a successful event to the setters.
NITS to the moon! <3
Can there be more than one teams from the same college?
Yeah
We have Amritapuri regionals on 7 and 8 October. On 6 we will be travelling on train. It would be great if the dates can be extended.
Unfortunately, we cannot change the dates due to time constraints.
Can you provide links to some past similar contests by NITS(Hacks 4.0,3.0,.. or so)?
NITS Hacks 1.0: https://assessment.hackerearth.com/challenges/college/nits-hacks-10-1/problems/
NITS Hacks 2.0: https://assessment.hackerearth.com/challenges/college/nits-hacks-20/problems/
NITS Hacks 3.0: https://assessment.hackerearth.com/challenges/college/nitshacks3/problems/
NITS Hacks 4.0: https://mirror.codeforces.com/blog/entry/90012
Thanks!
The contest page is not opening (NIT Hacks 4.0 one). It is saying "You do not have view access to non-public contest".
Can you give the view access to everyone?
You should be able to view the contest using this link
https://mirror.codeforces.com/contestInvitation/5b1abd498d0a5044b7c5701103d178d7c6c8c2bf
excited!!
Excited
where is my team
Go to your profile, go to teams, create your team, then register using the link provided, over there, select register as a team, choose your team name that you created, and you are done with the registration for the contest. This video might help you: https://www.youtube.com/watch?v=GsfEcikptoA&ab_channel=TheSocietyofCoders
done thamks
Heyy. Can we participate individually in this contest?
Yeah, you can create a team with just you as the member. But it won't be counted as official participation as the number of team members must be 2 or 3.
Top 15 non nits team?
Nope, top 15 from standings (may include NITS teams aw well).
top 15 official participants from standings?
Yes
My team and I cannot register for the contests, as the drop-down menu in which we have to select the team name appears to be blank.
watch this video and then try to register: https://www.youtube.com/watch?v=GsfEcikptoA&ab_channel=TheSocietyofCoders
Can you please open submissions?
Yes, done!
Editorial?
What are the prizes? are there any prizes for prelims as well?
No prizes for prelims. The prize distribution will be disclosed in 2-3 days.
Have you thought of the dates for the onsite contest carefully? Like on 24th there is Diwali, and considering we have to go to Silchar and then return back before Diwali, is almost impossible as very few trains are available.
You can shift to the 29th for a larger number of onsite participants!!
Agreed. Please postpone the onsite contest to 29th if possible.
We can understand, but we can't help. NITS Hacks is a part of Tecnoesis (Technical Fest of NIT Silchar) and we need to follow the dates accordingly.
Is 1k travel expense for one way, mean 2k in total for the whole travel per person? If not, then isn't it quite less?
It's for both ways. I know it's quite less, but that's the best budget we came up with, considering other facilities that will be provided to the onsite contestants.
If any team out of the top 15 doesn't want to come, will the lower ranked team be asked? Can we fill the google form to register now.
Yeah, lower ranked team will be asked. But the google form cannot be filled now.
Also, single member teams are not eligible as per the event rules, so will they be ruled out as well?
Yeah
When will you release the editorial for the contest?
By the blessing of God, all the members involved in NITS Hacks are in Amritapuri for ICPC regionals. So the editorial will take some time. Also, as other solutions are open, you can look at that for some hints.
Rough Solutions
Suppose if i to j is the longest path can be represented as
i — a — b — c ...... -j
there may be some branching in and of i,a,b,c....
let dis(i,j) = w
then if k <= w
then answer will be k-1 because you can take this path
else if k > w
then travel from i to j that would make you visit w+1 nodes and for visiting rest (k-w-1)
nodes you would necessarily have to enter some of branching and visiting any number of
nodes in branching would cost 2 per node therefore answer will be w + (2*(k-w-1))
finding w for each i in O(n) can be done using https://cses.fi/problemset/task/1132
dp[i] = freq[1]*dp[i-1] + freq[2]*dp[i-2].........freq[100]*dp[i-100]
it is not so difficult to reach this dp transition which is O(n*100)
to solve this in (100*100*100*logn) you can use matrix exponentation
you can learn it here https://mirror.codeforces.com/blog/entry/80195
we can only swap odd indexed adjacent elements
and only even indexed adjacent elements
so we can handle them separately
checking whether it is possible :
sort them sepeartely and merge them back
finding count if possible :
find inversion count of both seperately and print their sum
preprocess and store all the possible x's in sorted order
and while solving testcases print upper_bound(r)-lower_bound(l)
we only need count of distinct elements
build a segment tree
b[i]=0 if a[i+1]-a[i]=1 b[i]=1 if a[i+1]-a[i]!=1
and for update you will have to do two point updates
and for query you only have to query largest subarray with sum 0 which you can easily do with segment tree.
you can solve for each queue separately
for each color in the queue store {start_index,last_index} of the color and now just find the largest non-overlapping subset
the answer will be distinct color count — size of largest non-overlapping subset