Assembly via Remainders

Problem Name:
Assembly via Remainders
Site:CodeForces
Links:
Tags:
Problem setters: