We invite you to participate in CodeChef’s Starters 41, this Wednesday, 1st June, rated for Div 2, 3 & 4 Coders.
Time: 8 PM — 11:00 PM IST
Joining us on the problem setting panel are:
Contest Admins: Utkarsh Utkarsh.25dec Gupta, Daanish 7dan Mahajan,Jeevan Jyot JeevanJyot Singh
Setters:Tejas tejas10p Pandey,Utkarsh Utkarsh.25dec Gupta, Hrishikesh hrishik85 Kelker,TheScrasse TheScrasse ,Nishank IceKnight1093 Suresh, Ashish Kryptonix Gangwar, S.Manuj DarkSparkle Nanthan, Mradul bhatnagar.mradul Bhatnagar,Soumyadeep soumyadeep_pal_21 Pal, Prakhar _CoderPrakhar Goyal,Arun Arun_bro1 Sharma
Testers: Abhinav abhinavvv306 Sharma, Lavish lavish315 Gupta
Editorialist: Devendra Dragon_warrior7 Singh
Statement Verifier: Hriday the_hyp0cr1t3
Announcing Scholarship for CodeChef Certification in Data Structure & Algorithms — More than 100 Indian participants in Divisions 1, 2, and 3 will win scholarships for the CodeChef Certification exam (discounted prices). Scholarship criteria can be found on the respective contest pages.
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 are interested in them being used in CodeChef's contests, you can share them here.
Hope to see you participating. Good Luck!
Why is it downvoted?
Maybe due to the server issues in the previous contest :(
My cyan senses are tingling.
Maybe they have foreseen the future..
You will love the contest theme and feel proud after solving questions.
It looks like you forgot to add link to the contest page.
Thanks, updated.
Also, are non-student participants eligible to win LinkedIn Premium Subscription?
Codechef being codechef again :)
internal error!!
Some things never change :)
again same problem,something never change
Here we go again...
To Codechef, Beta tumse na ho payega!
useless codechef
500 we meet again
Why CodeChef wastes our time. I think if CodeChef is not prepared they should not organize the contest.
ikr it is getting ridiculous now
What a colossal waste of everyone's time!
Site should be normal in 1-2 minutes now. Please continue solving the problems. Contest is STILL RATED.
How to solve problems, without reading the problems ;-;
And how will we solve the problems when the only thing that`s appearing on the screen is 502 Internal Error?
One day cf will be down too and there will be no place for you to post such messages <(`^´)>
Must go unrated now though I don't care about anyways
I think the site is back now. Please reply if anyone is still facing issues.
Just as an update. Contest is still rated. Please do not leave the contest. Problems are very nice (According to me)
My completely accepted solution is showing partially accepted on the contest page and rank list.
mine too
which problem?
Now It's happening in Remove and Add.
It was because of the lag, should be fine now.
Do we have to solve those extra Div2 and Div3 problems as well to be eligible for a LinkedIn premium subscription?
No
Where did they announce this?
Will Div 1 participants also get the LinkedIn premium subscription? Utkarsh.25dec
The announcement says 'per division' so ig div1 is eligible too... Also, it would be stupid if they ignore div1 and give prizes to div2,3,4
Yeah, it would be stupid.
The contest was unrated for Div 1 that's why I wanted to confirm.
Yeah definitely
Problem Link: https://www.codechef.com/START41A/problems/DEARRANGE
Can someone help me in finding the test case in which it's giving the wrong answer: https://ideone.com/l1NRA8
I did a stress test as well, but could not find any test case on which it's failing.
1 3 3 2 1
Your code doesn't change position of the 1 after the first operation. This is indeed the only edge case (gave some hard time to my random shuffle solution also).
Thanks a lot :)
Is there any Codechef rating predictor?
yes
An alternative approach to the problem : https://www.codechef.com/START41A/problems/DEARRANGE
Read the editorial's solution for the test cases in which the answer will be $$$0$$$ or $$$1$$$ and also one edge test case.
Now, for case when $$$ans=2$$$ :
Rotate the array by $$$1$$$, $$$n$$$ times and check whether the current rotated array is valid or not each time. (Valid array: If it does not match with any index of the given array and also with the sorted array).
Now, there may be a possibility that none of the rotated arrays is valid. Think of the case when will it be possible :)
Since after each rotation, so there must be at least one index in each rotation that matches with the given array or with the sorted array, so all the indices follow some fixed order (i.e. after $$$x$$$ rotations $$$yth$$$ indexed element will make the array invalid).
Yes, it's easy, swap any two elements to disturb the order -> Just find two elements that do not match with their index, and also they should not match with their index after the swap.
The order is disturbed, now we can surely say that at least in one of the $$$n$$$ rotations we will get the valid array.
In $$$2nd$$$ step, just print the sorted array.
Submission : https://ideone.com/4S9T4y
What will be the estimated codeforces rating of Div-2 problem E(Black and White)?
1600
I think it would be 1700.
I got TLE in Div2 Problem E(Black and white). Here is my solution : https://www.codechef.com/viewsolution/65914374 Can anyone help me to figure out the solution??
Note, this line
memset(dp, -1, sizeof dp);
. What it does is sets the complete table in each testcase and even though memset is fast, it is still $$$O(n)$$$ where $$$n$$$ is the number of spots filled. Changing this line tomemset(dp, -1, (n+1)*2*2*sizeof(ll));
eliminates the TLE. Here is the accepted submission(link)