Badry's blog

By Badry, history, 5 years ago, In English

I would like to invite you to participate in the 2018 Egyptian Collegiate Programming Contest (ECPC 2018) that was held on the 20th of October 2018 in Alexandria, Egypt. The contest will be on Nov/17/2018 17:05 (Moscow time).

The problem setters were me Badry, Amr Mahmoud RetiredAmrMahmoud, Ahmed Kamel Kammola, Medo Nasser Medo. and Mohamed Yousri BitHashTech.

Also I would like to thank Ayman Salah _AymanSalah, Ali Ibrahim C137, Mohammad Yasser Mohammad_Yasser, Ahmed Soliman AhmedSoliman, Mostafa Abdulla MostafaAbdullah, Noureldin Yosri Noureldin, Khalid Abdulnasser Safrout and Mostafa Mahmoud Thrax for helping in preparing and testing the contest.

I hope that you enjoy the problems.

Full text and comments »

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

By Badry, history, 6 years ago, In English

My code in this 33193614 gives me run time error in test 9. The problem is that the code gives run time error after printing the output which is the very last line in my code !!!! .. any idea what may cause this run time error ?

Thanks.

Full text and comments »

Tags c++, rte
  • Vote: I like it
  • 0
  • Vote: I do not like it

By Badry, history, 7 years ago, In English

Hi Codeforces, I want to know if there is an efficient way to solve a^(x) = b mod(m) where x is the unknown value and m is some prime <=10^9 thanks in advance.

Full text and comments »

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

By Badry, history, 7 years ago, In English

Hi everyone, Recently, I was looking for short splay tree code but all codes that I could find online were very long, so I tried to write some relatively short code and I implemented this one https://ideone.com/qRJcLv . this code is short with respect to other available codes , so I'd like to share it with you. and if someone has a shorter or more efficient code please share it with us . thanks.

Full text and comments »

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

By Badry, history, 8 years ago, In English

Hi codeforces, I need to solve this sub task " given an array of zeros we need to apply 2 types of operations on it 1- increment elements in a given range by 1 or decrement them by -1 .. 2- count the number of positive integers in the array " I have a solution which work in O(M*sqrtN*logN) where M is the number of operations. but this solution is not fast enough to pass the time limit .. could some one please give me a faster solution. thanks in advance

Full text and comments »

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

By Badry, history, 8 years ago, In English

Hi codeforces, I was looking for some problems to practice on block cut tree, but I can't find any thing on the internet, so could you please provide me with some interesting problems on this topic . thanks in advance.

Full text and comments »

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

By Badry, history, 8 years ago, In English

Hi codeforces I want know if we can handle update queries in Persistent segment trees ... I understand Persistent segment trees but I don't know how to do point update or interval update.to know what i mean consider this known problem http://www.spoj.com/problems/DQUERY/ ... but there is a query to update the element in index i. thanks in advance :)

Full text and comments »

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

By Badry, history, 8 years ago, In English

Hi codeforces .. I am trying to solve this problem http://codeforces.com/problemset/gymProblem/100283/B but when I try to submit I get Denial of judgement verdict ..what do you think the problem is ???? is it in my code our it is from the judge itself ... thanks in advance

Full text and comments »

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