In INDIA two practice contests for the ICPC Preliminary Online round were conducted on 09/11/2024 and 14/11/2024 respectively at DOMjudge. The problems from the contests are as follows:
Practice Contest 1:
- A Game of Robots Limits: 1 sec/1.5 GB
- Discount in a Shop Limits: 1 sec/1.5 GB
- Ordering Teams Limits: 1 sec/1.5 GB
- Pen Pineapple Apple Pen Limits: 10 sec/1.5 GB
- Reduction Game Limits: 1 sec/1.5 GB
- Select Training Set Limits: 1 sec/1.5 GB
Practice Contest 2:
- A Triangle and Two Squares Limits: 2 sec/1.5 GB
- Colliding Balls Limits: 1 sec/1.5 GB
- Count Periodic Numbers Limits: 1 sec/1.5 GB
- Maximise the Sum Limits: 1 sec/1.5 GB
- Maximise Diversity of an Array Limits: 2 sec/1.5 GB
- Train or Walk Limits: 1 sec/1.5 GB
Do you have solutions to the problems ?
No as of now, but will update the blog if I get them
Can someone give a O(n logn) solution for problem Colliding balls.
From the problem, we make the observation that for the two balls to collide, they must be at the same coordinate at the same time.
This leads us to the equation:
To solve the problem, you can iterate over $$$X_i \cdot U_i$$$ and check if there exists a corresponding $$$Y_i \cdot V_i$$$ that satisfies the equation.
I dont think it would be an optimal approach
It is ... We did the same and received ACCEPTED .... This is the most optimal approach ... You just have to take the inputs ...
Can anyone explain count periodic number problem? I am getting time limit exceeded error and would like to know to know how to optimize the code
generate all valid mask and check if they are between $$$l..r$$$
could u please explain more
you can generate masks of pattern $$$..11100$$$ as there are few of them