HF RL Explorer

Implement a command-line tool /app/rangeq that builds a static interval-query index and answers queries…

Implement a command-line tool /app/rangeq that builds a static interval-query index and answers queries…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input contract: - The tool reads from stdin. Input format: - Line 1: an integer N (0 ≤ N ≤ 10^5) — number of…

The task

**Input contract:** - The tool reads from stdin. Input format: - Line 1: an integer N (0 ≤ N ≤ 10^5) — number of intervals. - Next N lines: each has two integers `low high` separated by one space. Constraints: -10^9 ≤ low ≤ high ≤ 10^9. The intervals may overlap, be degenerate (low == high), duplicate, or be in any…

Part of ai-and/termgrade-environments.