Editorials should be made simple

I have seen Codechef editorials to be very confusing and most new coders face the problems to understand the approach.
Why not make short and simple editorials explaining the approach NOT in a complicated way ?
More like Codeforces editorials.


I think codeforce editorial is not begginers friendly as compared to codechef.But one request is editorial should contain atleast one example and if necessary please include some visuals.


Codeforces editorials are easy to understand? That’s news to me.


Setter , tester solution should be easy and it should not contain things like (bits/stdc++.h) and stuff like typedef and they should make easy solution so that anyone can understand .


I agree even codeforces editorial are more cryptic then codechef.
Every editorial seems to target experts - which they maybe dont
need them because they already knew it. Purpose of the tutorial
should be it would make a beginners understand it well and
learn something from it so that they can adept from it.


look at this I have made a simple editorial of a medium-hard problem COOLCHEF using binary search.

Dude Instead of ranting about this. Just go and learn the basics of c++.



1 Like

I think they should not keep long templates right ?
Is that what you mean to say ?

Can you post the link to the contest from which you said you found the probs of this JUNE challenge?

At first it seems weird to everyone.
You can read about it here.

But I think a bit comment on tester,setter solutions can help a lot.

1 Like

Whenever i’m not able to solve a problem in a live contest i feel really bad and become sad. But i always take this as a silver lining. That is, if i’m not able solve a problem i’ll have to see the editorial later and i’ll learn new tricks. That seems cool to me.

If the level of editorial is within your reach, will you be able to get out from your comfort zone ? will you learn new tricks and things?


Can anybody help me find out the reason for TLE in this, I used the approach illustrated in the editorial. https://www.codechef.com/viewsolution/24861538 , the editorialist’s solution in same as your’s @l_returns , can you kindly help me with this?

XD :rofl::rofl: [20 char curse]

Isn’t this O(n) in worst case ?
int ct[c]={}

Wait… if i initialize an array with an empty bracket shouldn’t that by default initialize every element with zero in constant time?
Moreover if it does take O(N) time then why does sub-task 3 passes?

EDIT : Ok so i searched about it a bit, it turns out this is not a constant time operation (now
i feel like an idiot, that didn’t knew a thing this basic, been using this all the time.
Though initializing like this will not take worse time than memset or loop, its usually faster then those two.

I still don’t understand why does the 2nd ans 3rd subtask gives AC as the number of distinct elements ( = c in my program ) can be n/2 in worst case which makes this an q*n algo.

1 Like

Is it ?
I just declared the array outside and used memset and time taken reduced from
3.88s to 1.26s
Will try removing memset later.
I still thinks it’s memset which requires optimization.
Let me try.

I will rather prefer not to disclose that site.
If I disclose then everyone will use it to solve problems :frowning: .
I want to use it to solve problems in July long as well :slight_smile: , If I plan to seriously solve July long :stuck_out_tongue: .


It’s simple
“Weak test cases + strong optimizations”

Yeah and you know who is author of that link ?
@aryanc403 himself :stuck_out_tongue:
He makes editorials in Russian using Google translate and then solve questions :joy:
I am not sure about this though but one thing he does for sure
he add’s it to “robot.txt” so that you can’t find it using Google :stuck_out_tongue:

1 Like