When submitting a solution in C++, please select either C++14 (GCC 6-32) or C++17 (GCC 7-32) as your compiler. ×

Arpa's blog

By Arpa, history, 4 years ago, In English

Hi.

Here is the link to the editorial. Feel free to discuss problems here and ask me questions.

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

| Write comment?
»
4 years ago, # |
  Vote: I like it +1 Vote: I do not like it

Change it to read-only access

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

in ArraySorting we have to find longest non-decreasing Sequence instead LIS and change other elements.right?

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

Can anybody please explain the solution to the problem "Array Sorting". As i am not good with dp, i am not able to understand the editorialist's approach.

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

    Do you know how to find Longest Increasing Subsequence?

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

      Yes, i know that much.

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

        The answer is n — size of LIS.

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

          Does that mean i just have to set the values of the other elements which are not in the LIS to the minimum possible?