We invite you to participate in CodeChef’s Starters 169, this Wednesday, 15th January, rated upto 5 stars (i.e. for users with rating < 2200).
Time: 8:00 PM — 10:00 PM IST
Joining us on the problem setting panel are:
Setters: Archit Pols_Agyi_Pols Kumar.
Tester: Vaibhav kingmessi Khater
Text Editorialists: Nishank IceKnight1093 Suresh
Contest Admin and Statement Verifier: Archit Pols_Agyi_Pols Kumar
Note: Some problems may 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 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!









Are you guys ever gonna do anything to detect people copy pasting code directly from gpt?
are you talking about that two alike question last week yeah it was weird how many people solved it
interested in problems by Pols_Agyi_Pols
..
how to solve Tree Queries ? weights are also not given unique so we can't set max_depth to traverse = log(max_value of weight).
got it
Your solution can only give -1, 0, 1 or 2 as the answer, which is wrong!
For the input
The ouptput should be
if i remove ab how will you rearrange abcc to make palindrome?
got it ab> aabc . bruh I dont even know definition of smaller string (I thought smaller the string better the ans)
You can't.
But since "aabc" is lexographically smaller than "ab", it is the optimal choice.
Edit: posted too late.
;(
(WRONG SOLUTION) possible solutions :-
case 1 :- when there is only one character whose fre is odd(say character c1) .
a) find some charater != c1 but less than c1
b) take c1 odd times if c1 is less than all other charaters then find two other characters other than c1 such that c1 * (even times) + c2 * (odd2 times) + c3*(odd3 times) (subsequence is present in S) and c1 < c2 < c3 such that is lexicographically smallest
case 2:- when there is no character with odd frequency
take odd number of times two charaters such that
c1 * (odd1 times) + c2*(odd2 times) is present as subsequence in the , c1 < c2 such that is lexicographically smallest
i hope atleast with this u can find some counter
i guessed so much on no palindromes(little impr) , solution still is above what i finally thought .
🤔
when you remove aabb there is no string left which is a valid palindrome, when you remove ab the string that is remaining is ab that can not form palindrome so ab is the correct output.
damn my error must be due to this then
the empty string is a palindrome though? It is also mentioned in the statement
Note: The empty string is also considered a palindrome.The empty subsequence is lexicographically the smallest of all.