DreamingBoy's blog

By DreamingBoy, 8 years ago, translation, In English

Hello CodeForces How to find minimal prime divisor for n <= 10^12 if there are number of queries <= 10^5

Full text and comments »

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

By DreamingBoy, 8 years ago, translation, In English

Hi CodeForces, help me please with this -> problem

I tryed to use BFS, but i got TLE

Full text and comments »

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

By DreamingBoy, history, 8 years ago, translation, In English

Hi CodeForces.

I won't give link of problen and explain statement of problem, because this problem has more easier solution. But i want implement my solution idea, but i have problems with realization, and i need your help.

In problem i must calculate dp

like

I think, exist way to calculate dp mush faster -> dp[i] = max(dp[j - 1] + (mx[j] - mn[j])) 1 <= j < i

mx[j] -> maximum from j to i

mn[j] -> minimum from j to i

Thanks in advance!

Full text and comments »

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

By DreamingBoy, history, 8 years ago, In English

Where is editorial from author???

Can you explain soluton idea with treap?

Full text and comments »

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

By DreamingBoy, history, 8 years ago, In English

Hello CodeForces. Offensively that round #383 was rescheduled.

Please help me with this problem.

#CFstayalive

Full text and comments »

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

By DreamingBoy, history, 8 years ago, In English

Ladies and Gentlemen, please help me -> problem.

Full text and comments »

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