기출 문제 / 삼성 2019 Second Half Morning Problem 1

Post-War

You are given an n×n grid consisting only of numbers between 1 and 100.

The numbers in the grid represent the population of each region.

The country, having ended a long war, has decided to divide the land among five tribes.