wuhudsm's blog

By wuhudsm, history, 7 weeks ago, In English

A: Simple Update -I

Idea:Yugandhar_Master

First solve:sevlll777

solution
code(C++)

B: Simple Update -II

Idea:Yugandhar_Master

First solve:sevlll777

solution
code(C++)

C1: Yet Another Nim Game (Constructive version)

Idea:Yugandhar_Master

First solve:sevlll777

solution
code(C++)

C2: Yet Another Nim Game(Counting version)

Idea:Yugandhar_Master

First solve:sevlll777

solution
code(C++)

D: String From Another World

Idea:Yugandhar_Master

First solve:Egor

solution
code(C++)

E: Innocent Students

Idea:Yugandhar_Master

First solve:sevlll777

solution
code(C++)

F: Red Blue Tree

Idea:Yugandhar_Master

First solve:pandaforever

solution
code(C++)
  • Vote: I like it
  • +3
  • Vote: I do not like it

»
7 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

combinatorics for D in O(n): 283928228

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    why can i view the requested page?

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it
      Code
»
7 weeks ago, # |
  Vote: I like it +5 Vote: I do not like it

Problem link must be redirected.

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Could someone elaborate the solution of B?

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    you are doing ceil division of the segment which needs to be made 1

»
7 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Can someone take a look at this solution to E. Innocent Students why gives Wrong answer on test 22

Code
  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I have met the same problem, this is because the minimum difference can be greater than INF, for example:

    1
    1 1
    1000000000
    1 1 1 -1000000000
    

    Answer is 1 but your output is 0.

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Setting INF to 2e9 + 5 fixed the issue.

      Thank you!

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

F is a good problem, but the solution's time complexity is $$$O(n^3)$$$? It has $$$O(n^2)$$$ states and $$$n*n^2=n^3$$$ transfers, isn't it?

@Yugandhar_Master