Alkanes and Sriram
CodeChefOpen on judge ↗
Shriram is a senior chemist and computer scientist in Shrirambhoomi. Shriram has been asked to find the parent hydrocarbon in a given acyclic alkane. In Shrirambhoomi, carbon has infinite valency, which means the number of carbons attached to a carbon is not bounded and can be any number. The parent hydrocarbon in Shrirambhoomi is the chain with the maximum number of substituents. Substituents in
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start