#436
Unrated
I Would Walk 500 Miles
시간 제한
2s
메모리 제한
1024MB
제출
0
정답
0
맞힌 사람
0
정답 비율
0.0%

문제

Farmer John wants to divide his NN cows (N7500)(N \leq 7500), conveniently numbered 1N1 \ldots N, into KK non-empty groups (2KN2 \leq K \leq N) such that no two cows from two different groups can interact with each other without walking some number of miles. Cow xx and Cow yy (where 1x<yN1 \leq x < y \leq N) are willing to walk (2019201913x+2019201949y) mod 2019201997(2019201913x + 2019201949y)\text{ mod } 2019201997 miles to see each other.

Given a division of the NN cows into KK non-empty groups, let MM 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 NN cows into KK groups such that MM 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 NN and KK, separated by a space.

출력

Print out MM in an optimal solution.

예제 입력 1

3 2

예제 출력 1

2019201769
코드 제출

코드를 제출하려면 로그인이 필요합니다.

로그인
내 제출
제출 내역이 없습니다.
맞은 사람
아직 맞은 사람이 없습니다.
난이도 투표
Unrated0명 투표
로그인 후 AC 받으면 투표할 수 있습니다.
전체 제출
제출 내역이 없습니다.