You are not logged in. Please login at www.codechef.com to post your questions!

×

I am facing difficulty solving this problem.

Hello, everyone. I have spent quite some time to solve this problem, "Modulo Equality" ( https://www.codechef.com/problems/EQUALMOD ). I did this by finding the minimum of all the elements in B. After that, I loop through 0 to minimum and check how many operations I have to do to get every number in A so that remainder is that number (the number in the loop, i.e., from 0 to min). This approach gets me TLE. I saw solutions of fellow mates and came across these suffixes and prefixes they calculate. I did not understand what is going on. Can anyone please explain it to me?

asked 24 Oct '18, 14:56

lousy's gravatar image

0★lousy
1
accept rate: 0%


This is a question from ICPC 2017, so its editorial can be found here: https://discuss.codechef.com/questions/122233/equalmod-editorial. Please search a bit before posting in the future.

link

answered 24 Oct '18, 18:38

art_hack's gravatar image

3★art_hack
1
accept rate: 0%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×2,559
×1,901
×1,101
×934
×545
×364

question asked: 24 Oct '18, 14:56

question was seen: 112 times

last updated: 24 Oct '18, 18:38