HF RL Explorer

Write a program /app/solve.py that reads a sequence of commands from stdin, builds a multi-map of disjoint…

Write a program /app/solve.py that reads a sequence of commands from stdin, builds a multi-map of disjoint…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input contract (stdin): - One command per line (trailing newline optional on last line; lines can be empty…

The task

**Input contract (stdin):** - One command per line (trailing newline optional on last line; lines can be empty and must be ignored). - Tokens are separated by one or more space (0x20) characters. - Commands (case-sensitive, must be matched exactly as written): - `ADD <label> <start> <end>` Insert the half-open…

Part of ai-and/termgrade-environments.