rishi_07's blog

By rishi_07, history, 6 years ago, In English

These are my codes for the problem Compression Algorithm of ACM ICPC 2018 online round.
I don't understand what is the problem with the first solution.
Note: The expected precision was 10^-6.
Image 1
Image 2

Full text and comments »

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

By rishi_07, history, 7 years ago, In English

This is the original question: http://codeforces.com/problemset/problem/486/C

This question uses four keys (up, down, left and right) and can be easily solved by greedy approach in linear time. My question is what if there were only three keys (left, right and up) then how to solve it? Previously, when we found a mismatch between two positions like in (i)th position we have 'b' and in (n-i)th position we have 'c', both of them could be made same using just 1 operation irrespective of the index ((i)th or (n-i)th) where we are performing the operation. But now, 'b' to 'c' will take only 1 operation but 'c' to 'b' will take 25 operations. I think now the question can be solved using DP. But, I am unable to formulate it. Any idea?

Full text and comments »

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

By rishi_07, history, 7 years ago, In English

Hello everyone, Snackdown Pre-elimination Round A is scheduled on 27th May at 21:00. Along with that Codeforces Round #416 (Div. 2) is also scheduled on the same day at 20:05. It would be better if we can re-schedule Round #416 a day before or later. So, can we shift the dates?

Update: The issue is clear. There was discrepancy regarding whether Snackdown Pre-elimination rankings will be ACM style or score based. As they mention ACM style in contest page and score based in Rules section. Upon hovering over to rules page it is now clear that the ranklist will be score based.

Full text and comments »

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