Update: The contest has been postponed to tomorrow — 1st March. Apologies for the inconvenience.
We invite you to participate in CodeChef’s February Lunchtime, this Monday, 28th February, rated for all.
Time: 8:00 PM — 11:00 PM IST
Joining me on the problem setting panel are:
Setters: Ashley errorgorn Khoo, Manuj DarkSparkle Nanthan, Flamestorm153 flamestorm, Hazem zoooma13 Tarek, Daanish Mahajan, Prasant prasant21 Kumar, Utkarsh Utkarsh.25dec Gupta, Kanhaiya notsoloud1 Mohan, Tia Shi maomao90 Wei
Tester: Harris gamegame Leung
Head Admin: Alex Um_nik Danilyuk
Statement Verifier: Kanhaiya notsoloud1 Mohan
Admin: Anton antontrygubO_o Trygub, Yahor 244mhq Dubovik
Editorialists: Aman Retired_cherry Dwivedi, Trung Đặng Kuroni Đoàn Đức
Note that this Lunchtime will not have Subtasks.
The video editorials of the problems will be available on our YouTube channel as soon as the contest ends. Subscribe to get notifications about our new editorials.
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 seems to be some issue with AWS. We are postponing the contest by 30 minutes. Apologies for the inconvenience.
20:20 IST: There still seems to be some lingering issues with AWS. Hence to be safe, we are postponing the contest to 20:00 IST tomorrow — 1st March, Tuesday.
February Lunchtime happening in March. Who's cooking?
Contest is Postponed to tomorrow....
Codechef back to being codechef....
Can't participate tomorrow. Do I have to do something to unregister?
I don't think Codechef even has a registration button anywhere. Unless something has changed recently you won't be counted as having participated in the contest unless you make a submission.
DELETED
CodeChef_admin You should inform us 8: p.m itself. You don't know how much time we have wasted for this. Codechef back to being codechef...
24 hours delay! Thanks for the amusing maneuvering.
I intended to participate in tomorrow's Kotlin contest at CF. So, it seems that I won't be able to participate in the postponed Lunchtime contest.
So will I give february lunchtime or march lunchtime tomorrow? Lol.
Hey listen please! First of all there are only 2 3 contests for div2 and only 2 for div1 and that also are conducted like a gully-cricket match. If you are taking all of us lightly so will we. If you knew this, you could have informed this earlier. We are being informed when timer stops. Codechef is not a small college level website that is not checked/ monitored regularly. You must have checked this earlier, What were you doing then?? I can't tolerate now. I am boycotting your website for this gully-level management.
I do not think that we should blame CodeChef for trying to secure the proper operation of the web site during the contest.
Temporary issues in Amazon Web Services (AWS) can happen at any time. Internet issue happened right before few CF contests before, and forced the CF team to postpone the contest shortly before the start time.
No big deal! Take a deep breath, and have a little smile.
Best wishes
Ok
Their is a big difference between "sometimes"(as you said w.r.t. codeforces) and "often"(what codechef do).
I agree with you. CodeChef team should be able to let us know how many times these internet issues happened during the past few years, even without comparing this number to other competitive programming internet platforms. The team should be able also to endeavor for improving the reliability of the on-line services during short-time contests to world-level standard.
Just keep in mind that the contest is a competitive programming sport event, no more no less.
Everyone be like to codechef :
How will prizes be given if there are multiple users with same points?
Its strange that there were no sub-tasks!!!
(VISEMALL) Do the following conditions (any one) guarantee existence of hamiltonian path in $$$[L, R]$$$?
$$$L = R$$$
$$$X =L$$$ and all elements in $$$[L, R]$$$ are same.
There is at least one pair of unequal elements in $$$[L, X]$$$.
No, it's not enough.
L=1,R=5, X=2
00110
2->5->3->4->1.
Not sure here, but according to me, these should be the conditions(assuming we have a 0 at x) : let's denote by i and j the leftmost and rightmost occurrences of 0
1)if L = x, and all elements in [L,R] are same
2)if i = x, then there should be at least one '1' in [L,j], otherwise there should be at least one '1' in [i,j]
does someone have some good proof to COOKPERM, I just assumed that this was a good place to use gcd.
Lets denote cycle from first array by $$$(1,2,...,n-1,0)$$$ and cycle from second array by by $$$(1,2,3,....,m-1,0)$$$, Let $$$g=gcd(n,m)$$$.
We can see that on the ith step we will be at $$$(i \%n,i\%m)$$$. We can now see that start from $$$(0,0)$$$ we will reach back to $$$(0,0)$$$ only when $$$i$$$ is a multiple of $$$g$$$ because on each step $$$ (i \%n) \% g = i \%g$$$ and $$$ (i \%m) \% g = i \%g$$$.
This gives the lower bound. We can also see that cycles starting from $$$(j,0) \forall 0 \leq j \lt g$$$ are disjoint.
Few Hints regarding Problem Magical Modulo, would be very much appreciated.
We know that one element must be $$$1 \pmod{X}$$$ for some $$$X$$$.
If $$$a \equiv 1 \pmod{X}$$$, then $$$a - 1 \equiv 0 \pmod{X}$$$. So $$$X$$$ is a factor of $$$a - 1$$$...kinda
We could iterate over all elements $$$a_i$$$ in the array and test all factors of $$$a_i - 1$$$.
But that doesn't work, if we have an $$$a_i = 1$$$, because then we have infinitely many factors.
Find an $$$i$$$ such that $$$i$$$ does not appear in the array ($$$i \le n$$$). If we can't find such an $$$i$$$, then the array is a permutation.
Otherwise, iterate over all elements $$$a_j$$$ in our array and test all factors of $$$a_j - i$$$.
Can you please link your submission . I tried something similar and got TLE.
Here it is. You have to be careful with implementation, I had multiple TLEs as well.
.
Let us try to limit the possible values of X(the modulus number).sum=initial sum of the array, p_sum= sum of the permutation from 1 to N. If we are able to convert the initial array to a permutation by applying some modulo operation X, then this condition should hold true sum%X==p_sum%X, right? or in other words X*floor(sum/X)+residue=sum and X*floor(p_sum/X)+residue=p_sum. If we simplify it more, X*(floor(sum/X)-floor(p_sum/X))=sum-p_sum, from the above equation we can clearly see that X should be a factor of sum-p_sum.So it will be sufficient for us to consider only such X, such that X divides (sum-p_sum) After that, you just need some minor optimizations.
Cool, that's a much better way to go about it. Never thought about it like that.
Just assume that the answer exists and it is some number X
What is the relation between Sum(P)%X and Sum(A)%X? (P is a permutation of length N)
Sum(P)%X = Sum(A)%X
It means X is a multiple of, Sum(A)-Sum(P)
Iterate over all the divisors of Sum(A)-Sum(P) and check if P can be formed from A.
A request to code chef to please let us see the test cases after the contest.
CodeChef_admin Please look at the cheating happening in the codechef starters . The submissions for travelling in the graph increased exponentially . My rank changed from 150 to 900 in just a last hour. I request you to do plagiarism checks so that those who worked hardly their efforts doesn't go in vain.
https://discuss.codechef.com/t/updates-on-curtailing-plagiarism/98350