Ask AI
Open a hint-first prompt in a new AI chat. Grok may ask you to confirm before sending.
Open Claude Desktopintervals · range-union · offline-queries
The organizer’s problem statement is available at the official source link.
interval union
Union trips in a consecutive trip range
A crop-duster trip fertilizes an interval of fields; each query selects consecutive trip IDs and asks how many fields are covered.
trip field range 1
0–3
trip field range 2
1–4
merged union
2–5
- 1
Select trip range
Select trip indices X through Y. - 2
Merge field intervals
Overlay their field intervals and merge overlaps. - 3
Count covered fields
Return the number of distinct fields in the union.
Tools
1
2
3
4
5
6
7
8
9
10
11
12
Draft saved locally
|12 lines, 156 charsRun output
Run your code to see output.