TC QuantumAlchemy

From Algorithmist
Jump to navigation Jump to search


You're given a number of chemical reactions on an alphabet of 26 atoms. Each reaction takes 2 or more atoms and produces exactly one atom; and there is at most one way to produce each type of atom. Your task is, given some initial reactants, to figure out whether you can produce a target atom.

From TopCoder Single Round Match 344.


  • There's essentially only one way to produce the target atom.