Hello Codeforces!

We (twoplusthree, VS-Codes, Anupam_Ghosh and om_mittal7) are glad to invite everyone to Replay of JU BitFest Season One 2023 which is scheduled on [contest_time:445869].

BitFest is an annual ICPC-style Programming Contest organised for freshers and sophomores of Jadavpur University. This year marked the very first edition of this contest, which consisted of two rounds — online Prelims and on-site Finals. We hope you like the problems we have created!

You will be offered **$$$10 - 15$$$ problems** (from the combined problemset of both the rounds), and **$$$4$$$ hours** to solve them. You may participate alone, or in teams of not more than $$$3$$$ people. The problems vary in difficulty, ranging from **Easy** to **Intermediate**. Some of the problems may also require a classical solution. Note that the contest is **unrated**.

We would also like to thank:

- Yomapeed, beedle and DrearyJoke for testing the contest.
, for participating :-)You

Links:

**Contest Invitation link**(Registrations open $$$6$$$ hours before the contest starts)**Group link**

Good luck, and have fun!

**UPD 1**: Apart from the Replay problemset, there will be a non-zero number of new problems set by our testers — (Yomapeed, beedle and DrearyJoke), to make the round more interesting :-D. The total number of problems will remain $$$10 - 15$$$.

**UPD 2**: Registration for the contest is now live.

**UPD 3**: Contest is live now. Best of luck!

**UPD 4**: Contest is over. We hope you enjoyed the problems. Feel free to discuss them here. We will release the editorial soon.

**UPD 5**: Thank you all for participating! Here are the winners:

Rank | Contestant(s) |
---|---|

1 | kasparovian |

2 | gupta_nitin |

3 | Kira_1234 |

4 | Team Badut (floralfield, VincentK, aufannn) |

5 | Team Kindered_spirits (Coder_Nayak, sloppy_coder, _gyrFalcon_) |

First solve for every problem:

Problem | Contestant(s) |
---|---|

A | benzyl |

B | Team BhavyaKashyap (bhavya_rajdev, zxy0909) |

C | gupta_nitin |

D1 | Team BhavyaKashyap (bhavya_rajdev, zxy0909) |

D2 | kasparovian |

E | kasparovian |

F | kasparovian |

G | kasparovian |

H | Team crush ki smile :uwu: (18o3) |

I | Team skull issu (Fluffyking, flexr, legendaryboi) |

J | Jishudip |

K | prodipdatta7 |

L | YouKn0wWho |

**UPD 6**: The contest editorial is out! All contest submissions have been made public.

As a Setter I need contribution

twoplusthree orz

Hoping everyone takes part, and finds the problem set interesting!

As a setter, I can confirm that Harry Potter fans will like Problem G very much :-D

added to calendar

Excited to take part in this contest! Great initiative by the setters and testers :) Would recommend everyone to participate in the contest as it will be surely a great one.

Can't wait!

Excited for this event ✨

As a participants i expect good quality of questions :)

Hoping the problem set will be interesting

It's the first ever contest on this platform hosted by JU- genuinely excited for this landmark event! <3

Reminder: Contest starts in less than an hour! Good luck!Can someone tell me how to solve K?

maintain a multiset of all zombie's health. at any point of time sum of x in first query become greater than any element erase it form multiset and subtract it from total sum. and along with that subtract mst.size() times x as well. The main point is how you are going to reduce the total sum at every step. I wrote these line of code I think you can get a idea out of it.

This is one of the most elegant solutions I have seen! Really nice approach to inserting new elements and also handling the old elements.

Keep a priority queue in max heap containing the health of the zombies and keep a variable denoting total sum.For query type 1 ,add x to total damage and keeping popping elements untill top element <= total damage so far and subtract it from sum as its dead.The sum of health of alive zombies is sum of their initial health — no.of zombies alive * total dmaage so far.While adding a new zombie for query type 2 consider its health to be (y + total damage so far) and push this to priority queue

Code Link

Thankyou authors for such a nice problemset.

Problemset were good, Is there editorial available for this contest?

Will be released by Sunday. Good to hear you enjoyed the contest.

The editorial has been released now. Hope you like it :-)

Really cool problem set!

Thanks!

wow. i enjoyed very much. What a problem these are.

thank you very much all authers.Glad to hear that you enjoyed the contest and found the problems interesting

Nice Problemset.Enjoyed.

How to solve L / E ?

For E:

TutorialWhen an element is pushed to the stack, observe the new size of the stack. For each value of the new stack size, store :

In a query if we want to find out what was the $$$n^{th}$$$ stack element at the $$$t^{th}$$$ time instant, we simply binary search over the time instants stored for stack size $$$n$$$ to find out the last element pushed before or on time instant $$$t$$$.

Implementationcan you please make the submissions public

Done

twoplusthree can you tell me how you made {You} of LGM colour?

`<p class="rated-user user-legendary">You</p>`

can anyone share the solution/implementation of L?

I really had fun solving the problems. Short Problem Statements with good logic and implementation. That's what I crave for.

Really Good Initiative.

Thanks! Glad you enjoyed the contest :-)

Enjoyed the contest. The problems were really cool as they have short statement with proper informations. Although I could manage to solve only 4 of them. More specifically loved the problem "Fine De" which I manage to solve using binary search. I want to know is it possible to public others submissions?

Great to hear that! We'll be posting the Editorial of the contest quite soon, and all the contest submissions will be made public after that. This is done so that those who wish to can spend a little more time pondering upon the problems :-)

Can anyone tell me some hints regarding Problem G : Gringotts.I am thinking in this Direction — Let's suppose there are 'X' gold coins and 'Y' silver coins, then according to question, equation :-`X*g + Y*s = n`

, and my answer is`17*X + Y`

.So, we have to increase the value of 'X' as much as possible, that is to find smallest value of 'Y', such that,`(n - Y*s) % g = 0`

, what will be this minimum 'Y'.This was the direction I was thinking for, Is it right, If it is, then how to proceed further, as we have also constraints of Test Cases <= 10000What if the weight of gold is so high that replacing it with silver is not optimal. Think about any such case.

Got it, I was thinking such a illogical logic in hustle

also we can consider that if 17*s>=g, that amount which we can remove (of s) to convert it to g would always need to be a multiple of the lcm of both g and s. So here's an easier way of understanding it (in my opinion).

then we can easily find the quantity of g and s and compute the answer.

Also it gives a time complexity which can pass all the tests. (logarithmic due to taking the gcd using in-built function)

any hints for C ?

Contest was really fantastic, and its a humble request to organizers and setters of this contest, That please provide the tutorial and make submissions public. twoplusthree

The editoral is out now, and all contest submissions have been made public. Apologies for the slight delay.