> For the complete documentation index, see [llms.txt](https://wenbo-notes.gitbook.io/coding/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wenbo-notes.gitbook.io/coding/kattis/easy/airfare-grants.md).

# Airfare Grants

## Question

{% embed url="<https://open.kattis.com/problems/airfaregrants>" %}

## Solution

### Idea

The behind idea of this problem is [Broken mention](broken://spaces/KipySCGxC8NC1UpA24DS/pages/VmhaZZYv5McggYVUf1MA#linear-search). Since the list is unsorted, we can only use linear search to find the maximum and minimum. After that, the logic is simple.

### Code

{% @github-files/github-code-block url="<https://github.com/mendax1234/Coding-Problems/blob/main/kattis/airfaregrants/airfaregrants.c>" %}
