기출 문제 / ACPC 2026 ACPC

Highway Delivery

Cody runs a logistics operation along a straight highway. There are N warehouses and N stores placed at distinct integer coordinates on the highway. The i-th warehouse is at coordinate ai, and the i-th store is at coordinate bi.

Cody pairs each warehouse with exactly one store (a one-to-one matching) and dispatches one truck per pair.