# queues medium

The Fair Referee

Parents reported line-cutting at the ice rink. You have the full log — run the replay. ⛸️

You get a log of join:name and serve:name events. Every serve SHOULD go to the person at the front. Print fair play if the log is clean, or cheating detected at the first serve that doesn't match the front.

Example:

Input: events = ["join:mia", "join:leo", "serve:mia", "serve:leo"] Output: fair play

mia joins first, then leo. Each serve matches whoever's actually at the front (mia, then leo) — no cheating found.

💡 need a hint?

q-fair-referee.py🔒 given lines are locked — write your code in between
loading...