We invite you to participate in CodeChef’s Starters 95, this Wednesday, 21st June, rated till 6-stars Coders (ie. for users with rating < 2500).
Time: 8:00 PM — 10:00 PM IST
Note that the duration is 2 hours. Read about the recent CodeChef changes here.
Joining us on the problem setting panel are:
Setters: Yash yash_daga Daga, Ulmeanu catalystgma Vlad, Wuhudsm wuhudsm, Wesam Wesam Naseer, Al-Shahriar AST_TheCoder Tonmoy, Kanhaiya notsoloud1 Mohan
Testers: Satyam satyam343
Statement Verifier: Kanhaiya notsoloud1 Mohan
Video Editorialists: Sundar K Letscode_sundar, Madhav jhamadhav Jha, Jwala jwalapc, Adhish ak2006 Kancharla
Text Editorialists: Nishank IceKnight1093 Suresh
Contest Admin: Yash yash_daga Daga
Note: Some problems have subtasks
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 for all users for 1 day as soon as the contest ends, after which they will be available only to Pro users.
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!
There is a typing mistake in the post. The date should be 21st June
Updated, thanks!
and in the contest's div 1 first problem too :-)
yash_daga sir orz !..
AST_TheCoder kopsss bro
codechef day
Contest starts in 30 minutes!
There is a mistake in Transfusion Chain problem.
Blood type O donors can also donate to recipients with blood types O, according to the test cases, but it is not mentioned in the statement.
got two penalities due to this mistake if o is only for a,b,ab then i can use o only once at the start i think if in a running contest if some issue occurs due problem setters then all the penalties should not be counted on those problems
I don't think you get penalties in Starters anyway.
max(l[i], l[i+1], l[i+2], ..., r[i])
till more than 1 Hour of the Contest, and after 1 Hour of the Contest, without any Announcement it get's written asmax(l[i], l[i]+1, l[i]+2, ..., r[i])
, Am I wrong Problem Setter's and Tester's yash_daga wuhudsm ?Updated:- I am sorry, from my point of view, I think the Contest was very Good overall, Some fault's can happen as we all are Human, But I can say the Problem's were very Interesting to upsolve...
who reads the entire easy problem in contests . people probably went with the flow in transfusion chain
In the second testcase of ARRAY_BREAK, if the arr is [1], then after applying any operation will it include the expected sum?
Like it will be (sum+1)/(cnt+1) or sum/cnt(unaffected by this)?
If at any point the size of the array becomes one, then for all further operations, it will remain unchanged.
name it a probability(math) contest rather than a dsa or cp contest
MathChef :/
My O(K*N^2) submission is getting TLE on problem "Break this array".Runtime is too strict.
I think you are doing lots of power operation
Does your solution has an extra factor of log(MOD) due to modular division?
This is the submission -Link.It doesn't have extra log factor.
when you have too many modulo operations it is better to store the modulo in a const variable, doing this makes your solution run in 0.7s
The link gives'403' error.
updated link
3 probability problem in a contest.. wth admin (:
also rating system skip the last contest rating which show on right side of problemset page, plz look at that.
How were people able to solve TRANCHAIN without even considering "blood group O can donate to O as well"?
I wasted the first 30 minutes on the first problem due to this typo.
Ig many had studied biology in their lower grades . They went with the fact.
Constraints of Guess game say that N >= 2 but for the first subtask it is N >= 1. How do you define the expectation when N == 1?
Unfortunately I just wrote my full solution to that but can't submit. Please allow practice mode.
I think Kira_1234 got 60 points due to this. His full solution does not pass the first subtask because it has a testcase with N == 1
Thanks a lot for pointing this error out. I did not notice this and was wondering for the last hour what the issue in my code was.
Hey, sorry about this, the solutions have been rejudged after removing the n==1 case. 2 submissions were affected due to this.
i was getting 31/7 for the second sample test case in the problem break this array which equals 428571436 modulo 1e9+7. Can explain me what is the actual ans to it ?
It is 41/12, the resulting arrays you get are not equiprobable, you can make a probability tree and get this result.
I see now, actually the probabilities were not completely independent for each stage, it had to be cumulated. The problem statement was a little unclear about this fact, i just assumed the process to be independent at each stage from the previous stages.
Thanks for the clarification.
Thanks for the Contest. Though it was a bit math-heavy, I learned something new today.
Probability — GCD combination question was really very good.
Can anyone explain me 2nd test case of ARRAY_BREAK?
Since lots of people have trouble in understanding this, here's a probability tree explaining it.
i was able to get the total sum and number of possible partitions possible using dp with an algorithm of o(n^3*k) and seeing the explanation of the first test case, i thought maybe it's just the modular division of both but it was certainly a lot more than that, anyways it was my first time experiencing expected values problems.
Similar Question for Chef and Moves of GCD: Link
My submission: Link
Guess Game could also be simply done in O($$$NloglogN + T\sqrt{N}$$$). If we fix the small number $$$d$$$, the large number can have $$$\lfloor\frac{n}{d}\rfloor-1$$$ values. Also since the answer only depends on $$$d$$$, we can find the range of $$$d$$$ for which $$$\lfloor\frac{n}{d}\rfloor$$$ is constant and add their contribution to answer. It is well known that there are $$$O(\sqrt{n})$$$ distinct ranges.
In Question BREAK THE ARRAY I Dont Know where my code is bugging can anyone please figure it out. It is not able to run even in lower limits of 100 Yet other peoples have did the similar and got AC sub link :- https://www.codechef.com/viewsolution/98819410
There is an $$$O(n)$$$ solution to PARTITION without using segment trees. Consider the $$$O(n^2)$$$ dp
Transitions can be maintained using monotonic stack.
Can you explain this?
can someone tell what's wrong in my solution for subtask1 of "Break This Array", soln
I guess there is a problem while viewing solutions of some participants, can you please look into it. Example of one such user's submission
For Problem CAMOG, the editorial says. " We do the $$$2^k$$$ operation for each pair of (number, divisor) below $$$N$$$. It’s well-known that there are $$$\mathcal{O}(N\log N)$$$ such pairs, so a simple upper bound on complexity is $$$\mathcal{O}(2^6 \cdot N\log N)$$$. "
Could you explain why is the number of pairs $$$\mathcal{O}(N\log N)$$$ , I was thinking that it should be something like $$$\Sigma$$$ $$$x^{1/3}$$$. I read somewhere that $$$N^{1/3}$$$ is a good upperbound for the number of divisors.