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

heavenly_'s blog

By heavenly_, history, 3 weeks ago, In English

Hi, I have this DnC problem, I would greatly appreciate any help, thank you!

Given an array a with n elements, calculate the sum of min * max over every ranges [l, r] (1 <= l <= r <= n)

Constraints:

1 <= n <= 1e5, 1 <= a_i <= 1e9

Sample test:

4

1 4 3 1

Answer: 58

Full text and comments »

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

By heavenly_, history, 5 weeks ago, In English

I have my bet on jiangly, what about you guys?

Full text and comments »

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

By heavenly_, history, 6 months ago, In English

Hello, I'm doing this problem, the statement is in Vietnamese, therefore I'll give you a summary:

Given n rectangles on a 2D coordination (x, y, w, h), two rectangles are connected if any of it's edges touches, find the largest connected rectangles area (w, h <= 500), no rectangles overlaps with each other and each rectangle is (x, y, x + w, y + h)

The editorial suggested using DSU combined with sweep line, however I'm still not clear on it, I'd appreciate some help, thanks!

Full text and comments »

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

By heavenly_, history, 9 months ago, In English

I struggle hard with this sometimes, contests are the only thing that would enforce it for me, how do you guys do it?

Full text and comments »

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

By heavenly_, history, 11 months ago, In English

https://codeforces.net/submissions/chillhouse7773/contest/1883

This account's behavior is very strange, submitted A and B at the same time, not to mention with different templates, other submissions have used a different templates as well, isn't it strange?

Full text and comments »

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