FreeHit's blog

By FreeHit, history, 2 years ago, In English

I want to code A. Get together with approach by limiting value of f(t) ? but i cant get through it ? can i use sweep line algorithm.... after limiting value?and how to code it?here is link to question https://codeforces.me/edu/course/2/lesson/6/3/practice/contest/285083/problem/A

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

| Write comment?
»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

You can binary search on the answer, and maintain a segment that everyone can reach. If the segment is non-empty then the value is ok.

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

    i find function to be unimodal so ternary search is most optimal then binary search.

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

      How is the function unimodal?

      • »
        »
        »
        »
        2 years ago, # ^ |
        Rev. 3   Vote: I like it 0 Vote: I do not like it

        by general intution plot will be minima type where at local minima there will be minimum time requird for all peoples to collect at place.

        still can get more precise

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

    Not understood can you tell briefly about it

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

https://pastebin.com/FyrFZyUw <= my code

I am getting ans = 1.4 on

5 -1 5 10 3 4 2 7 10 8 1

but the ans is 1.5