prebeginner's blog

By prebeginner, history, 5 years ago, In English

Hello! I think that such a problem already exist but I cant find it. Is it possible to solve it?

Problem:

Let f(l, r) = (r — l + 1) * min(l, ..., r)
Find maximum possible f(i, j) for every i, j
n <= 1e5
ai <= 1e9

Thanks!

Full text and comments »

  • Vote: I like it
  • -14
  • Vote: I do not like it

By prebeginner, history, 5 years ago, In English

Hello I weas solving https://codeforces.me/contest/1450/problem/D. I saw, that some people solved this problem with binary search. I cant understand why does it work. Can you please explain, why it works. I cant understand explanation in editorial

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it