Ask AI
Open a hint-first prompt in a new AI chat. Grok may ask you to confirm before sending.
Open Claude Desktopsorting · greedy · selection
The organizer’s problem statement is available at the official source link.
number line
Visualize Vogon zoo
A safe cage requires pairwise blood-type separation of at least K; sort types and select a maximum compatible subset.
sorted x1 <= x2 <= ...select xinext selected xj: xj - xi >= K
- 1
Encode the task
A safe cage requires pairwise blood-type separation of at least K; sort types and select a maximum compatible subset. - 2
Advance the state
Place blood types on a number line and mark selected values at least K apart. - 3
Read the result
Use the final marked state to identify the requested answer.
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.