HF RL Explorer

Implement a command-line tool /app/intervaldb that stores intervals and answers range queries. The tool must…

Implement a command-line tool /app/intervaldb that stores intervals and answers range queries. The tool must…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input format (stdin): - A sequence of commands, one per line, terminated by EOF. - Lines are ASCII text…

The task

**Input format (stdin):** - A sequence of commands, one per line, terminated by EOF. - Lines are ASCII text using LF (`\n`) line endings exclusively. - Lines can be empty; empty lines must be silently ignored. - Each line is either an `ADD` command or a `QUERY` command.

Part of ai-and/termgrade-environments.