Hello Codeforces!
I am thrilled to invite you to the ICPC 2027 Mock Prelims — 2, which will take place on Wednesday, 30th September at 17:00 IST
This contest is hosted as part of the Inter-College Competitive Programming Camp. It is specifically designed to provide a highly authentic ICPC preliminary experience, perfect for finalizing your team's strategy and building contest stamina before the main event.
I hope you like the previous contest and these mocks are helping you in fine tuning your team strategies. I will suggest everyone to mimic the prelims environment like single machine, CC compiler, not taking decision based on the standings etc. Some checklist from my team code-book which may be helpful to the teams :

You will be given 7 problems and 3 hours to solve them. The contest will follow standard ICPC rules and scoring.
The contest theme is inspired from my own ICPC team MST's Journey from our college in Varanasi to Our second regionals in Amritapuri.
This round wouldn't have been possible without the contributions of many individuals:
The problems were authored by me (Enigma27) and prepared by Claude.
A huge thanks to our amazing team of testers for their invaluable feedback, rigorous stress-testing, and for ensuring the problemset is well-balanced: s_jaskaran_s, Arnav_Singhal1, lucky__389, Soumil69, Rodger2041,Divine_Spark, jenil0108, Madhav_AK and prnv10.
Special Thanks to aryanc403 for late night testing and taking time out to do a post contest discussion stream.
Thanks to MikeMirzayanov for the excellent Codeforces and Polygon platforms.
To participate, please ensure you have joined the Inter-College Competitive Programming Camp group and registered your team for the contest.
We hope you enjoy the problems. Good luck, have fun, and see you on the leaderboard!








When can we expect guidelines for the ICPC prelims ? Like last year they told us to use some script for OBS Studio and all. There is no notification about it. Its 3 days to go for the prelims now, till now also no information about how the setup should be No information about the official mock contest yet.
It will be on Codechef SEB, I guess the instructions are already mailed to the teams.
Thanks for responding , they have uploaded all the guidelines on the website some minutes or hours back, I checked 1.5-2 hours earlier then there was no information
Contests starts in 1 hour
Stream for solution discussion has started here
is it really necessary to use arrays and not use lambda function or other higher constant methods as I kept failing on E due to this???
In E constraints on power of primes were reduced to 30 from 60 to smoothly allow O(ne^2) solution. I don't think you need any constant factor optimization in this problem
my solution used a n*e loop for final counting,
rather i was using 2 lambda functions. one for dfs and one to combine{calculate} 2 child node answers.
initially it would return a new 32 size vector which tled but changing this to instead just set the first array somehow did not Tle.
I also used auto &&self instead but i may be wrong but post cpp-17 auto &Self behaves the same for forwarding reference.
the tle code is as follows i did have gemini check if i was passing something by value or other bugs but it seems there weren't any just a bit more mods.
also nice pfp btw :3