Hello everyone! Hope you're all doing well.
Guess what? The next edition of D'Code by IIT Gandhinagar is here!
We have 6 algorithmic problems prepared for you to put your mind to test your problem solving skills.
The contest starts today at 9 PM IST and has a duration of 2 hours. Link of the contest: https://www.codechef.com/DCDE2023
Need an incentive? We've got you covered. There are exciting prizes worth ₹26,000 for the top performers!
NOTE: You need to register here, to be eligible for prizes.
Setters/Testers: mshandilya, crap_the_coder, nishuz, Karan-Gandhi, dewansh461.
Good luck for the contest and we hope you all have fun! :D
Auto comment: topic has been updated by crap_the_coder (previous revision, new revision, compare).
problems not loading
I got problem links from standings
No idea what happened. There seems to have been an issue with CodeChef, but it should be fixed now.
Clashes with Meta Hacker cup. Pls reschedule.
Due to the technical summit events in our college, we couldn't have it at a different time. Sorry about the clash :(
Status: Wrong Answer Submission ID: 1028653819 Memory: 3.7M Sub-Task Task # Result (time) 1 0 Correct (0.00) Subtask Score: 100% Result — Correct Total Score = 100%
Sorry, i am not familiar with the platform. Total Score is 100% while Wrong Answer! How does it work?
Hey, sorry. We are trying to figure this out, but the verdict will be "Correct" if your code is correct.
This happens with me also
bruh wtf is the time limit for D ??
nishuz orz
Is there a mistake with this idea for Trade Center? Or is it just a mistake in my implementation?
Goods from city $$$x$$$ will always travel on the shortest path from $$$x$$$ to $$$t$$$.
The shortest path routes represent a tree rooted at $$$t$$$ (since it is "guaranteed that there exists exactly one cheapest path between the Trade Center and any other node")
Query 1 is equivalent to $$$w_{u} \cdot dist_{u}$$$.
Query 2 is equivalent to $$$\sum_{x \in subtree_{u}} {w_{x}}$$$ in this new tree.
Query 3 is equivalent to $$$lca(a, b)$$$ in this new tree.
Query $$$1, 2, 4$$$ can be handled by using any point update, range sum query data structure on the dfs order of the tree since $$$subtree_{x}$$$ represents a contigious range $$$[in_{x}, out_{x}]$$$ in the dfs order. LCA can be calculated normally by your choice of implementation.
Yes, your solution is correct; there might be a bug in the implementation.
Posting announcement 3 hours before the contest? Do you think people live on CF or what?
How to solve break stick? I used gnu pbds but it gave me TLE.
Also where can the editorial be found?
Gnu pbds has high constant factor. Here, Use Fenwick tree, it is very fast.
Hi can i use lazy segment tree? for range updates
Why do you want to range update? Just do point update and range query
https://www.codechef.com/viewsolution/1028659335 ???
I don't have access to your submission. My ordered set soln was also giving TLE.
I tried this after failing with seg tree and ordered set and still got TLE
Where are you submitting your code? The problems are not available for submit for practice for me.