Please read the new rule regarding the restriction on the use of AI tools. ×

wuhudsm's blog

By wuhudsm, history, 10 days 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

»
9 days ago, # |
  Vote: I like it +8 Vote: I do not like it

combinatorics for D in O(n): 283928228

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

    why can i view the requested page?

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

Problem link must be redirected.

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

Could someone elaborate the solution of B?

  • »
    »
    9 days 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

»
8 days 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
  • »
    »
    8 days 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.

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

      Setting INF to 2e9 + 5 fixed the issue.

      Thank you!

»
8 days 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