문제
Farmer John wants to divide his cows , conveniently numbered , into non-empty groups () such that no two cows from two different groups can interact with each other without walking some number of miles. Cow and Cow (where ) are willing to walk miles to see each other.
Given a division of the cows into non-empty groups, let be the minimum of the number of miles any two cows in two different groups are willing to walk to see each other. To test the cows' devotion to each other, Farmer John wants to optimally divide the cows into groups such that is as large as possible.
The memory limit for this problem is set to 512MB, above the usual 256MB limit.
입력
The input is just one line, containing and , separated by a space.
출력
Print out in an optimal solution.
예제 입력 1
3 2
예제 출력 1
2019201769
코드를 제출하려면 로그인이 필요합니다.
로그인