####Introducing the Go for Gold February Long Challenge!↵
Competitive programmers, get ready! The Go for Gold Long Challenge is back with its second iteration, bringing another thrilling opportunity to test your problem-solving skills and climb the leaderboard on Codeforces!↵
↵
After the success of the first iteration, we are excited to present yet another round of engaging and challenging problems for the community. Whether you're a seasoned competitor or just starting out, this contest is designed to offer a balanced mix of difficulty levels to help everyone push their limits.↵
↵
**What’s Special About This Challenge?**↵
↵
- Handcrafted Problems: The contest is a mix of some classical educational problems picked from CF and some fresh algorithmic challenges carefully curated to test your logical thinking, algorithmic optimisation skills, and competitive programming prowess.↵
- Diverse Difficulty Levels: Problems ranging from beginner-friendly to advanced, ensuring that everyone has something to tackle.↵
- Community-Driven Contest: Hosted in the Go for Gold group on Codeforces, this contest is built by the community, for the community!↵
- Learning and Improvement: Get exposed to new problem-solving techniques and discuss solutions with fellow competitors after the contest.↵
↵
#### Contest Detail :↵
↵
Please join the codeforces group : https://codeforces.me/group/OseQ3LxgeG and register for the contest.↵
↵
- **Start time** : 21th Feb 2025, 03:00 PM (IST)↵
- **End time** : 2nd March 2025, 12:00 AM (IST)↵
↵
**Why Should You Join?**↵
↵
- Enhance Your Competitive Programming Skills↵
- Gain Exposure to Unique Problems↵
- Engage with an Active Community of Programmers↵
↵
**Contributors**↵
↵
All problems are prepared by [user:Dragonado,2025-03-02] ,[user:enigma27,2025-02-20],[user:evenvalue,2025-02-20],[user:ash1794,2025-02-20] and me ([user:aucoder123,2025-02-20])↵
↵
**UPDATE** ↵
↵
**The contest has started**↵
↵
You can join our discord server for any questions or volunteering for future contests: [Discord Invite](https://discord.gg/ZDUN7TAamP)↵
↵
From the next iteration as we will get more volunteers and sponsors, we will try to have all new problems. If you want to contribute : Please fill this [form](https://docs.google.com/forms/d/e/1FAIpQLSdc8YwlszAfBLYxY_IIK7P1DIjTvpv4eTJ3orbjtvVXQ5gZ9Q/viewform?usp=sharing).↵
↵
The countdown has begun! Mark your calendars and prepare to Go for Gold once again. We can’t wait to see your amazing submissions.↵
↵
Stay tuned for more updates and happy coding!↵
↵
**UPDATE 2** : Hints/topics are published↵
↵
<spoiler summary="Colorful cycles"> DSU with rollbacks </spoiler>↵
↵
↵
<spoiler summary="Jenil's Door Dillema">Depending upon wether the door is closed or open you can get a predicate equation for the two switches (p -> q).</spoiler>↵
↵
↵
<spoiler summary="Goku play with numbers">Use the recursive definition of array creation to get the value at a particular index</spoiler>↵
↵
<spoiler summary="Weird Panda">What will the solution if b is small ? what if b is large? Can you combine both the solutions to get the optimum time complexity. </spoiler>↵
↵
<spoiler summary="Ultimate Divisor">The answer will be one of the factor of a number present in the array. If you pick any random number and check for all of its divisor then you have 50% probability to get the answer correct.</spoiler>↵
↵
<spoiler summary="Saiyans in Wetlands">Can you use the constraints given on the wetlands to decompose this in K independent games? As per the rules, what can be the maximum number of cells in a shore? Can you use bitmasking to solve the problem for each independent games.</spoiler>↵
↵
<spoiler summary="Number Game">Can you calculate the f(n) with f(n+1) ? The author has also given you some hints through statement and tests.</spoiler>↵
↵
<spoiler summary="Collatz 2">Apply brute force and look at pattern? </spoiler>↵
↵
<spoiler summary="Vertex Permutation">Brute force can go upto O(n!). You can use bitmasking to optimize the brute force, the only issue is how to calculate the cost on the fly. Use the definition of abs function i.e., abs(a-b) = a-b if a>b else b-a.</spoiler>↵
↵
<spoiler summary="Matrix Trouble">Let ans[(i1, i2, j1)] be the smallest j2 such that the submatrix (i1, j1) → (i2, j2) contains at last two equal elements. If all integers inside the submatrix (i1, j1) → (i2, m) are distinct, then ans[(i1, i2, j1)] will be equal to m + 1.↵
↵
For a particular query consisting of i1, i2, j1, j2 we only need to check whether j2 < ans[(i1, i2, j1)].</spoiler>↵
↵
↵
<spoiler summary=" ↵
Palindrome Master">Notice we can do n^2 solns so you can compute answer for each l,r in advance</spoiler>↵
↵
<spoiler summary="Good Rectangles">In a good rectangle all rows and columns are in AP.So it can be said that all first row is in AP all columns are in AP, and common difference for all columns are also in AP</spoiler>↵
↵
<spoiler summary="The Final Obstacle">Let's brute over each possible position pos of the center of the middle part (the part that must be palindrome by problem statement). Then let's take as a middle the maximum palindrome among all centered in the position pos. After that we have to take as prefix and suffix such maximum-sized substrings, which satisfy all problem constraints, and don't intersect with medium part.↵
↵
After we do these calculations for each possible position pos, the answer to the problem will be just maximum among answers found on each step.</spoiler>↵
↵
↵
<spoiler summary="Difficulty Order as per Setters">↵
A : 2000 — 2200↵
↵
B : 2000↵
↵
C : 1600↵
↵
D : 2100↵
↵
E : 2500↵
↵
F : 2000↵
↵
G : Hit or miss↵
↵
H : 800↵
↵
I : 1600 — 1800↵
↵
J : 2100 — 2300↵
↵
K : 1800↵
↵
L : 2000↵
↵
M : 2800</spoiler>↵
↵
Competitive programmers, get ready! The Go for Gold Long Challenge is back with its second iteration, bringing another thrilling opportunity to test your problem-solving skills and climb the leaderboard on Codeforces!↵
↵
After the success of the first iteration, we are excited to present yet another round of engaging and challenging problems for the community. Whether you're a seasoned competitor or just starting out, this contest is designed to offer a balanced mix of difficulty levels to help everyone push their limits.↵
↵
**What’s Special About This Challenge?**↵
↵
- Handcrafted Problems: The contest is a mix of some classical educational problems picked from CF and some fresh algorithmic challenges carefully curated to test your logical thinking, algorithmic optimisation skills, and competitive programming prowess.↵
- Diverse Difficulty Levels: Problems ranging from beginner-friendly to advanced, ensuring that everyone has something to tackle.↵
- Community-Driven Contest: Hosted in the Go for Gold group on Codeforces, this contest is built by the community, for the community!↵
- Learning and Improvement: Get exposed to new problem-solving techniques and discuss solutions with fellow competitors after the contest.↵
↵
#### Contest Detail :↵
↵
Please join the codeforces group : https://codeforces.me/group/OseQ3LxgeG and register for the contest.↵
↵
- **Start time** : 21th Feb 2025, 03:00 PM (IST)↵
- **End time** : 2nd March 2025, 12:00 AM (IST)↵
↵
**Why Should You Join?**↵
↵
- Enhance Your Competitive Programming Skills↵
- Gain Exposure to Unique Problems↵
- Engage with an Active Community of Programmers↵
↵
**Contributors**↵
↵
All problems are prepared by [user:Dragonado,2025-03-02] ,[user:enigma27,2025-02-20],[user:evenvalue,2025-02-20],[user:ash1794,2025-02-20] and me ([user:aucoder123,2025-02-20])↵
↵
**UPDATE** ↵
↵
**The contest has started**↵
↵
You can join our discord server for any questions or volunteering for future contests: [Discord Invite](https://discord.gg/ZDUN7TAamP)↵
↵
From the next iteration as we will get more volunteers and sponsors, we will try to have all new problems. If you want to contribute : Please fill this [form](https://docs.google.com/forms/d/e/1FAIpQLSdc8YwlszAfBLYxY_IIK7P1DIjTvpv4eTJ3orbjtvVXQ5gZ9Q/viewform?usp=sharing).↵
↵
The countdown has begun! Mark your calendars and prepare to Go for Gold once again. We can’t wait to see your amazing submissions.↵
↵
Stay tuned for more updates and happy coding!↵
↵
**UPDATE 2** : Hints/topics are published↵
↵
<spoiler summary="Colorful cycles"> DSU with rollbacks </spoiler>↵
↵
↵
<spoiler summary="Jenil's Door Dillema">Depending upon wether the door is closed or open you can get a predicate equation for the two switches (p -> q).</spoiler>↵
↵
↵
<spoiler summary="Goku play with numbers">Use the recursive definition of array creation to get the value at a particular index</spoiler>↵
↵
<spoiler summary="Weird Panda">What will the solution if b is small ? what if b is large? Can you combine both the solutions to get the optimum time complexity. </spoiler>↵
↵
<spoiler summary="Ultimate Divisor">The answer will be one of the factor of a number present in the array. If you pick any random number and check for all of its divisor then you have 50% probability to get the answer correct.</spoiler>↵
↵
<spoiler summary="Saiyans in Wetlands">Can you use the constraints given on the wetlands to decompose this in K independent games? As per the rules, what can be the maximum number of cells in a shore? Can you use bitmasking to solve the problem for each independent games.</spoiler>↵
↵
<spoiler summary="Number Game">Can you calculate the f(n) with f(n+1) ? The author has also given you some hints through statement and tests.</spoiler>↵
↵
<spoiler summary="Collatz 2">Apply brute force and look at pattern? </spoiler>↵
↵
<spoiler summary="Vertex Permutation">Brute force can go upto O(n!). You can use bitmasking to optimize the brute force, the only issue is how to calculate the cost on the fly. Use the definition of abs function i.e., abs(a-b) = a-b if a>b else b-a.</spoiler>↵
↵
<spoiler summary="Matrix Trouble">Let ans[(i1, i2, j1)] be the smallest j2 such that the submatrix (i1, j1) → (i2, j2) contains at last two equal elements. If all integers inside the submatrix (i1, j1) → (i2, m) are distinct, then ans[(i1, i2, j1)] will be equal to m + 1.↵
↵
For a particular query consisting of i1, i2, j1, j2 we only need to check whether j2 < ans[(i1, i2, j1)].</spoiler>↵
↵
↵
<spoiler summary=" ↵
Palindrome Master">Notice we can do n^2 solns so you can compute answer for each l,r in advance</spoiler>↵
↵
<spoiler summary="Good Rectangles">In a good rectangle all rows and columns are in AP.So it can be said that all first row is in AP all columns are in AP, and common difference for all columns are also in AP</spoiler>↵
↵
<spoiler summary="The Final Obstacle">Let's brute over each possible position pos of the center of the middle part (the part that must be palindrome by problem statement). Then let's take as a middle the maximum palindrome among all centered in the position pos. After that we have to take as prefix and suffix such maximum-sized substrings, which satisfy all problem constraints, and don't intersect with medium part.↵
↵
After we do these calculations for each possible position pos, the answer to the problem will be just maximum among answers found on each step.</spoiler>↵
↵
↵
<spoiler summary="Difficulty Order as per Setters">↵
A : 2000 — 2200↵
↵
B : 2000↵
↵
C : 1600↵
↵
D : 2100↵
↵
E : 2500↵
↵
F : 2000↵
↵
G : Hit or miss↵
↵
H : 800↵
↵
I : 1600 — 1800↵
↵
J : 2100 — 2300↵
↵
K : 1800↵
↵
L : 2000↵
↵
M : 2800</spoiler>↵
↵



