×

# I am facing difficulty solving this problem.

 0 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 0★lousy 1 accept rate: 0%

 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. answered 24 Oct '18, 18:38 3★art_hack 1 accept rate: 0%
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• 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