CEMC Banner

Problem of the Week
Problem C
Taking a Hike

There are five people in the Hidaka family: Shun, Naoki, Kana, Daichi, and Mitsuko. No two people are the same age. The family walks along a hiking trail in a single-file line. As they walk, each person counts the number of people in their family both in front of them and behind them who are older than them. This information is shown in the table.

Family Member Number of older people in front Number of older people behind
Shun 1 2
Naoki 3 1
Kana 0 0
Daichi 2 0
Mitsuko 1 0

Determine the order that the family members are walking in. Then list the family members in order from oldest to youngest.

This problem was inspired by a past Beaver Computing Challenge (BCC) problem.

Theme: Computational Thinking