Блог пользователя aopo

Автор aopo, история, 2 года назад, По-английски

There is a grid of ($$$10^{18}$$$, $$$10^{18}$$$) blocks. The person standing on (i, j) block can move to (2i, j) or (i, 2j) or (i-j, j) or(i, j-i) inside the grid. If he starts from (1, 1) output "Yes" if he/ she could reach (m, n) block else output "No".

Ex: Input:

3

1 2

4 7

10 10

Output:

Yes

Yes

No

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор aopo, история, 3 года назад, По-английски

AcidRain

I tried solving it using the fact that there must be some collection of shield which should cover the entire range (B to E), but got the wrong answer. The tag says it to be related to dynamic programming. But how? I don't know. Can someone give any approach to how can it be solved with dp?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +4
  • Проголосовать: не нравится

Автор aopo, история, 3 года назад, По-английски

Minimal Payment Can anyone suggest an approach to solve this one? It came in yesterday Atcoder Beginner Contest 231. The editorial is not clear to me and the sample code provided there is giving 404 error. Please someone help me with this!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +6
  • Проголосовать: не нравится

Автор aopo, история, 3 года назад, По-английски

The official editorial of the Half Sequence says

This
Reason they give

But, what is the proof behind it? I mean what is the intution behind saying this? Can someone give a formal proof for it.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +11
  • Проголосовать: не нравится

Автор aopo, история, 3 года назад, По-английски

Hello connections!

Recently i tried my hands on this problem. I solved it using segment tree and fenwick tree but i don't know how to solve it using LIS concept. It would be very nice if some of you can share your approach for solving this.

Here is what i think regarding this!

We maintain a multiset and go on inserting elements from left to right adding elements one by one , finding the upper_bound of ai and removing it if its exists and then doing ans=max(ans,*st.rbegin()) if the size of my multiset is bigger than l.But this is giving me WA.I don't know where am i going wrong.It would be very helpful if someone can point out my mistake.

Link to Problem

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор aopo, история, 4 года назад, По-английски

Hello guys, can someone help me in understanding the solution to this problem. I read the editorila several times yet i can't get it.I don't know why is it written so "Let's shorthand this with minNumber(colorCount, number[colorCount])." Can someone share his ideas or any approach for solving this problem. I bet this is one of the most interesting problem on ad-hoc,greedy!

Полный текст и комментарии »

  • Проголосовать: нравится
  • -4
  • Проголосовать: не нравится