Medo.'s blog

By Medo., history, 5 years ago, In English

The editorial of the 2018 Arab Collegiate Programming Contest (ACPC 2018) can be found here

If you would like to discuss the problems or ask questions about the solutions, feel free to do so here!

We will write edits below incase we found typos or mistakes.

Full text and comments »

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

By Medo., 5 years ago, In English

We would like to invite you to participate in the 2018 Arab Collegiate Programming Contest (ACPC 2018) that was held on the 11th of November 2018 in Sharm El Sheikh, Egypt.

The contest will be available on Nov/19/2018 19:00 (Moscow time)

The contest was prepared and/or tested by Thrax, Badry, Medo., BitHashTech, _AymanSalah, SAeed, Mhammad1,justHusam,AhmedSoliman ,Safrout, Mohammad_Yasser, Khairy,abdelkarim, RetiredAmrMahmoud,Lvitsa, MostafaAbdullah and others.

Edit : The contest has been delayed by 24 hours so not to clash with a CF round.

Full text and comments »

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

By Medo., history, 6 years ago, In English
  • Vote: I like it
  • +25
  • Vote: I do not like it

By Medo., history, 6 years ago, In English

Time : https://www.timeanddate.com/worldclock/fixedtime.html?msg=SRM%20727&iso=20180111T0200&ah=2&am=0

Author is Errichto

Also check : http://codeforces.com/blog/entry/57011

Please do not upvote my SRM blogs. I don’t want my contribution sky rocketing for something I do not take credit for. I only aware you so you don’t miss SRM’s like I did when cgy4ever ( or in the past, Chrome) stopped posting them.

Full text and comments »

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

By Medo., history, 6 years ago, In English
  • Vote: I like it
  • +48
  • Vote: I do not like it

By Medo., history, 6 years ago, In English
  • Vote: I like it
  • +92
  • Vote: I do not like it

By Medo., history, 6 years ago, In English

Starts in few hours.

Date and Time : https://www.timeanddate.com/worldclock/fixedtime.html?msg=Topcoder%20SRM%20724&iso=20171128T1600&ah=2&am=0

Redoing this blog as it appears people liked it last time. (If there is someone from TC that prefers to post these kind of blogs, I will happily delete this).

Full text and comments »

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

By Medo., history, 6 years ago, In English

Hello recently I attempted this problem: http://codeforces.com/contest/341/problem/D

I understand editorial's solution, but I found in comments a very nice solution, that appears it can be generalized to query sums or higher dimensions. Here is it.

Spoiler

Link to code : http://codeforces.com/contest/341/submission/4391987

I could only get a vague idea, but not much into detail of what's going on especially the code. With this being a 4 years old comment, I don't think it's a good idea to ask the guy who posted, but can anyone please clarify in an easier way, or provide similar problems/blogs to it? Perhaps how to solve this problem if it was for sum queries instead of xor using this technique.

Thanks.

Full text and comments »

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

By Medo., history, 6 years ago, In English

Topcoder SRM 723 starts tomorrow.

https://www.timeanddate.com/worldclock/fixedtime.html?msg=Topcoder%20SRM%20723&iso=20171118T1700&ah=2&am=0

I only created this blog because cgy4ever stopped doing them. I always disliked knowing about SRMs before they start by like 1-2 hours so thought I'd post about it a day in advance. ( If there is someone from TC that prefers to post these kind of blogs, I will happily delete this).

Full text and comments »

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

By Medo., history, 6 years ago, In English

Hi CF!

I was recently solving this problem : http://www.spoj.com/problems/KOPC12B/

The problem statement is just one line, so no need to rephrase it.

Knowing the solution to the problem without weights, and printing consecutive values, I guessed the answer to be n*C(2n,n)/2 after some trial and error and was surprised it passed.

I tried to arrive at a combinatronics proof by trying to pose the problem as counting binary strings with certain properties, but didn't get somewhere noticeable, I also tried changing (C(n,k)^2) to C(n,k) * C(n,n — k).

Any help proving this? Thanks.

Full text and comments »

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

By Medo., history, 7 years ago, In English

Hello!

I was recently solving this problem : http://poj.org/problem?id=1823

The problem basically says given an array of maximum size of 16000 where each element is one or zero, we need to perform the following two operations.

-Set range [L,R] to ones or zeros.

-Query maximum length of a subarray of ones

The problem can be indeed be solved by a segment tree, however using bitset we can do updates in O(N/32), and with N being 16000 that's just 500.

The problem is in querying the maximum length, I haven't reached any solution better than N operations, are there any ways to achieve something like N/32 ?

Please note, I already know the segment tree solution, I'm interested in bitset.

Full text and comments »

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

By Medo., history, 7 years ago, In English

Anybody has a clue?

It's been down for a long time..Sad to see such OJ with very useful tasks disappearing.

Does any body know if I can find Timus tasks somewhere else at least for now?

Full text and comments »

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