Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

Array transform algo doesnt seem to be right

$
0
0

Hello people..can you please help me with this problem http://www.codechef.com/problems/ARRAYTRM

i understood the algo... if there exists atleast n-1 numbers such that they can be reduced to 0 , then through some mathematical caluculations we deduce that there must be only 2 distinct remainders (number % k+1 ) and that only one or none of the numbers should give a different remainder...

But is it necessary that if there are two distinct remainders then the numbers can be deducted to zero?? how will u prove this??


Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>