wuhudsm's blog

By wuhudsm, history, 8 months ago, In English

A

Idea:Yugandhar_Master

solution
code(C++)

B

Idea:Yugandhar_Master

solution
code(C++)

C

Idea:Yugandhar_Master

solution
code(C++)

D

Idea:Yugandhar_Master

solution
code(C++)

E

Idea:Yugandhar_Master

solution
code(C++)

F

Idea:Yugandhar_Master

solution
code(C++)

G

Idea:Yugandhar_Master

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

»
8 months ago, # |
  Vote: I like it +5 Vote: I do not like it

good-forces but not very good editorials

»
8 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hey, is it possible to give access to check other's submissions? I am finding it difficult to solve problem C even after reading the editorial.

»
8 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Yugandhar_Master (previous revision, new revision, compare).

»
8 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Still can't understand problem C, anyone can explain it please? Why is log2(n) + 1 the lower bound for the sum? and how can one come up with such answer?

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

    Let's consider an integer x, the minimum floor value we can get from x by dividing with one of the lesser value than x is 1(which is trivial), so think of that minimum value y which is less than x and gives 1 when divides x , next move to y-1 and repeat this process until you reach 1. If you observe carefully this process repeats log2(n)+1 times where everytime we get the answer 1 hence from this construction we will get the F(p)=log2(n)+1. Why this is lower bound? (this is proved with some induction in editorial).

»
8 months ago, # |
  Vote: I like it 0 Vote: I do not like it

hi can anyone take time to see my try for E , why i have a runtime error , I used binary lifting , but i am missing on something : https://codeforces.net/gym/105137/submission/259284000

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

hey! I have tried E and its giving RE on TC4.

Code here is the code to my solution if someone can help.

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

    You initialised ans vector with size n+1, but actually your ans vector have to answer for m answers check it!