Help needed for UVA 11312 — Flipping Frustration

Revision en1, by Tobby_And_Friends, 2017-09-24 14:37:37

Problem Link: https://uva.onlinejudge.org/external/113/11312.pdf

My partial solution:

1) If the given values do not satisfy this equation -> rx + ly = t then there is no solution.

2) Now, in order to find the minimum values I can do a BFS but this will result me a TLE in certain cases. How should I implement this part cleverly?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Tobby_And_Friends 2017-09-24 14:38:15 1 Tiny change: 'imum values I can do ' -> 'imum value I can do '
en1 English Tobby_And_Friends 2017-09-24 14:37:37 392 Initial revision (published)