### Dominater069's blog

By Dominater069, 4 weeks ago,

We invite you to participate in CodeChef’s Starters139, this Wednesday, 19th June, rated for till 5-Stars(ie. for users with rating < 2200).

Joining us on the problem setting panel are:

Written editorials will be available for all on discuss.codechef.com. Pro users can find the editorials directly on the problem pages after the contest. The video editorials of the problems will be available only to Pro users.

The following is the number of problems in each division :-

• Division 1 : 5 problems
• Division 2 : 6 problems
• Division 3 : 6 problems
• Division 4 : 7 problems

Also, if you have some original and engaging problem ideas, and you’re interested in them being used in CodeChef's contests, you can share them here. Hope to see you participating.

Good Luck!

Congratulations to Top 5!

• +40

 » 4 weeks ago, # |   0 domi orz
 » 4 weeks ago, # |   0 Hoping for quality problems.
 » 4 weeks ago, # |   +23 Hoping for C++23
 » 4 weeks ago, # |   0 My day is ruined by the quality of the last problem and my disappointment is immeasurable.
•  » » 4 weeks ago, # ^ |   0 18o3 I know you were competing on leetcode a lot and they like such problems there but on codechef it's just meh
•  » » 4 weeks ago, # ^ |   +16 sorry :( O(LB) was kind of cute to me. It isnt 18o3's fault.
 » 4 weeks ago, # |   0 what was the idea behind B problem the divisor one problem.
•  » » 4 weeks ago, # ^ |   0 greedily choose the island and check if they can be removed from the graph
•  » » 4 weeks ago, # ^ |   +10 Partition the set of vertices $V$ into two sets $A$ (in which vertex $1$ is present) and another set $B$. Now, if you want to disconnect vertex $1$ from all the vertices in set $B$, you shall not remove any edges which have both endpoints in either $A$ or $B$. So to disconnect them you would only remove edges between $A$ and $B$. Let the sum of $a[i]$ in set $B$ be $S$, and let the total sum of $a[i]$ be $T$. Then the cost is $(T - S) \times S$. For $S \leq \frac{T}{2}$, this formula achieves minima at small $S$, so you would one by one add smaller $a[i]$ to set $B$, until its $cost \le C.$ For $S \gt \frac{T}{2}$, the minima is achieved when $S$ is as large as possible, so in such a case set $A$ contains the single vertex $1$. Check whether its $cost \leq C$, and then output the answer which has the minimum size of set $A$.
•  » » » 4 weeks ago, # ^ |   0 iam down
 » 4 weeks ago, # |   0 Isn't the answer function of destroying bridges monotonic? Or else why would bs fail?
•  » » 4 weeks ago, # ^ |   +4 Its not monotonic actually Let sumc be sum of Ais of chosen islands which will not be connected to 1 and sum be sum of all AisThen our cost is (sum-sum1)(sum1)<=cThere is an interval where sum1 is not allowed
 » 4 weeks ago, # |   0 div2 C was cute