Блог пользователя JeevanJyot

Автор JeevanJyot, 16 месяцев назад, По-английски

We invite you to participate in CodeChef’s Starters 77, this Wednesday, 15th February, rated till 5-stars Coders (ie. for users with rating $$$< 2200$$$).

Time: 8 PM — 11:00 PM IST

Joining us on the problem-setting panel are:

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 for all users for 1 day as soon as the contest ends, after which they 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!

  • Проголосовать: нравится
  • +30
  • Проголосовать: не нравится

»
16 месяцев назад, # |
  Проголосовать: нравится +28 Проголосовать: не нравится

you guys need to chill out with the silly adhoc problems

»
16 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Any hints on SORTXOR ?

I knew how to reverse array in 3n/2 steps, but to sort I didn't end up on any conclusion, is it related to cycles ?

  • »
    »
    16 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    yes

    • »
      »
      »
      16 месяцев назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      I know how to find the cycles in a permutation but how in an array with duplicate elements?

      • »
        »
        »
        »
        16 месяцев назад, # ^ |
        Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

        try to get positions what will be the new position of element in this position

        It is easy with permutaions is because new positoin of i is i in sorted permutation

»
16 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

How to solve KFOREST?

  • »
    »
    16 месяцев назад, # ^ |
    Rev. 3   Проголосовать: нравится +3 Проголосовать: не нравится
    Solution
»
16 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Is it not possible to solve sort a string using some kind of custom sort function?

  • »
    »
    16 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    We don't always have to put the smaller value at lower index.
    look at the string, str = "cab"
    output from a custom sort function will be "cab", but the lexicographically smaller value that can be obtained is "bca"