You are not logged in. Please login at 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" ( ). 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

accept rate: 0%

This is a question from ICPC 2017, so its editorial can be found here: Please search a bit before posting in the future.


answered 24 Oct '18, 18:38

art_hack's gravatar image

accept rate: 0%

toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 24 Oct '18, 14:56

question was seen: 112 times

last updated: 24 Oct '18, 18:38