Sequence Center
Time limit3sMemory limit256 MB
Given k integer sequences of length n, find an integer sequence that minimizes the maximum Manhattan distance to them.
- Level
Hard9 of 10
- Topics
- Math, Binary search
- Solved
- No attempts yet
Problem
You are given integer sequences of length . The distance between sequences and is . Find an integer sequence that minimizes over the given sequences. Any optimal sequence is accepted.
Input
The first line contains and (, ). Each of the next lines has integers, the absolute values are at most .
Output
Print the integers of a center sequence separated by single spaces.