Omarr.'s blog

By Omarr., history, 2 months ago, In English

Just now I've realized that the tutorial for Codeforces Round 1079 (Div. 1, Div. 2) was only linked to the div 1 and not the div 2, I hope this gets fixed soon.

Full text and comments »

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

By Omarr., history, 6 months ago, In English

Hey me and my friend Mostafa_Alaa99 made a cool tutorial for round 1058 problems A-D.

it's our first time!!

check it out, it's really cool! tutorial here, each problem is in a seperate video since we didn't know how to put them all in one video!

Full text and comments »

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

By Omarr., history, 7 months ago, In English

Hi guys!

Problem G on round 1054 is a repeated problem. It's an easier version of problem 840D. Density.

The problems are effectively the same, with the only difference being in Density there's a number k (2 <= k <= 5) and you must print values that occur more than (R — L + 1) / k times. This problem also appears in USACO Platinum Divide And Conquer as the last problem.

This may have allowed many people to solve it, even if they didn't know the solution.

In problem G, I also don't like that they didn't add the -1 case in the sample tests causing many correct solutions to achieve Wrong Answer on test 3.

Thanks for reading this blog :), Bye!

Full text and comments »

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

By Omarr., history, 15 months ago, In English

This is my first blog ( Hopefully not the last :D )

I came across this problem in a group contest that no one could solve (I couldn't solve it either, so i need help) basically all the problem is just given an positive integer n (1 <= n <= 1e5) and array a, your task is to find the number of pairs i, j (1 <= i < j <= n) such that a[i] | a[j] = a[i] or a[i] | a[j] = a[j]. Yes, that's it.

I'd be really grateful for any help. Thanks for your time.

Full text and comments »

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