d0uch3b4g's blog

By d0uch3b4g, history, 7 years ago, In English

Some days ago, I set a problem in a contest for the first time. The contest was only for my junior brothers-sisters. Now I am giving the link of that problem, take a look and try to solve. Here is the link: (https://www.hackerrank.com/contests/iubat-ramadan-contest/challenges/who-will-be-the-winner). I think you'll be happy after solving this problem.

If you try harder but you're not being able to solve it then you can take a look to given editorial(Please don't see editorial without trying harder). Editorial Link: (https://pastebin.com/DpfJTXAu).

N.B: Please show some kindness to me, if I've made some mistakes in the problem or if the problem isn't quite clear to you. Cause this is the first time, I've set a problem for a contest. :)

And if you find out some better logic or formula to solve this problem, you can share by commenting here. :)

Thank you. :)

Full text and comments »

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

By d0uch3b4g, history, 7 years ago, In English

Can anyone suggest me some best blogs or editorials written on DSU(Disjoint Set Union) ??

Full text and comments »

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

By d0uch3b4g, history, 7 years ago, In English

Is there any efficient way to count occurrences of elements while taking input in an array (without using STL, Nested Loop)?? If so, then what's that process and what will be the complexity??

Full text and comments »

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