Pols_Agyi_Pols's blog

By Pols_Agyi_Pols, 5 days ago, In English

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:

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!

  • Vote: I like it
  • +28
  • Vote: I do not like it

»
5 days ago, # |
  Vote: I like it -19 Vote: I do not like it

it's Tuesday

»
5 days ago, # |
  Vote: I like it -6 Vote: I do not like it

Are you guys ever gonna do anything to detect people copy pasting code directly from gpt?

  • »
    »
    5 days ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    No

  • »
    »
    5 days ago, # ^ |
    Rev. 2   Vote: I like it -8 Vote: I do not like it

    They dont give a shit about contests. All they care about if people are paying them money or not. They only have resources to set 1 contest per month but somehow pushes out 4 which affects the quality and makes almost all questions GPTable, even in div1.

    • »
      »
      »
      5 days ago, # ^ |
      Rev. 2   Vote: I like it -14 Vote: I do not like it

      I honestly dont understand why they put out so much junk questions. Just set 2 or 3 good questions per week which will be the decider. Set 2 easy questions for lower rated people doesnt matter if its GPTable or not. Merge div1 and div2 merge div3 and div4. Codechef doesnt have the user base that calls for 4 seperate divisions. Would make things pretty simple and efficient. And contests will finally have some value.

  • »
    »
    5 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    are you talking about that two alike question last week yeah it was weird how many people solved it

»
4 days ago, # |
  Vote: I like it +17 Vote: I do not like it

interested in problems by Pols_Agyi_Pols

»
4 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Contest starts in ~35 mins.

»
3 days ago, # |
Rev. 3   Vote: I like it -8 Vote: I do not like it

..

»
3 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Huff, constant subsequence got me, really excited to see the sol

»
3 days ago, # |
  Vote: I like it 0 Vote: I do not like it

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).

»
3 days ago, # |
  Vote: I like it 0 Vote: I do not like it

any case where this code fails for no palindrome ??

Code
»
3 days ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

got it

  • »
    »
    3 days ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    Your solution can only give -1, 0, 1 or 2 as the answer, which is wrong!
    For the input

    1
    6
    ababcc

    The ouptput should be

    4
    aabc
    • »
      »
      »
      3 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      if i remove ab how will you rearrange abcc to make palindrome?

      • »
        »
        »
        »
        3 days ago, # ^ |
        Rev. 2   Vote: I like it 0 Vote: I do not like it

        got it ab> aabc . bruh I dont even know definition of smaller string (I thought smaller the string better the ans)

      • »
        »
        »
        »
        3 days ago, # ^ |
        Rev. 2   Vote: I like it +1 Vote: I do not like it

        You can't.
        But since "aabc" is lexographically smaller than "ab", it is the optimal choice.

        Edit: posted too late.

  • »
    »
    3 days ago, # ^ |
    Rev. 4   Vote: I like it 0 Vote: I do not like it

    (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

»
3 days ago, # |
  Vote: I like it 0 Vote: I do not like it

i guessed so much on no palindromes(little impr) , solution still is above what i finally thought .

»
3 days ago, # |
Rev. 4   Vote: I like it -9 Vote: I do not like it
WA

🤔

  • »
    »
    3 days ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    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.

  • »
    »
    3 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    damn my error must be due to this then

  • »
    »
    3 days ago, # ^ |
      Vote: I like it +12 Vote: I do not like it

    the empty string is a palindrome though? It is also mentioned in the statement

    • »
      »
      »
      3 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Note: The empty string is also considered a palindrome.The empty subsequence is lexicographically the smallest of all.