Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

p0uya3767's blog

By p0uya3767, history, 2 months ago, In English

As you know,(or dont) The Consistent friend of mine AlRntn recently reached GM . yesterday I noticed he also got my handle conquered too. :joy:

So Congrats ali , keep up. :fire:

Full text and comments »

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

By p0uya3767, history, 19 months ago, In English

hi. I heard Carrot is broken, so do you know anything else that works the same?

Full text and comments »

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

By p0uya3767, history, 2 years ago, In English

Two pointers is a very simple and useful algorithm and actually using it is optional but, using it will make your algorithm easier and more simple.

but now, how to use it ? I think its good for you to look at https://www.geeksforgeeks.org/two-pointers-technique/ too. it'll be useful:blush:

so let go ...

As it's shown by its name this algorithm use two pointers on an array(or two arrays) which initially are located at position x, y . then if CONDITION1 move pointer1 one to left/right and if CONDITION2 move pointer2 one to left or right.

now let's switch to code.

QUESTION ANSWER SPOIL DANGER ==================

Full text and comments »

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