Armageddon
시간 제한1초메모리 제한1024 MB
마나 k를 1부터 n까지 쓸 때 x+y+z=k인 음이 아닌 정수 x, y, z에 대해 x(x+1)/2 · y(y+1)/2 · a^z의 최댓값을 구해 10^9+7로 나눈 값을 출력한다.
문제
Cocoa, the magic sword president of RUN, has obtained a new magic sword named Armageddon. To maximize its power, Cocoa intends to enhance it.
Specifically, the sword's power is determined by its length , enchantment level , and brilliance , according to the formula:
where are nonnegative integers. Here, is a fixed constant determined when Armageddon was forged. Initially, are all initialized to 0.
Cocoa can invest her mana to improve the sword. For each mana spent, she can increase either , , or by .
For each , determine the maximum possible power of the sword if Cocoa uses exactly mana to enhance the sword.
입력
The first line contains three integers , , and separated by spaces, where .
출력
Print values in a single line, separated by spaces.
For the -th value, output , where is the irreducible fraction representing the maximum possible power after investing exactly mana.
제한
힌트
There is no magic sword president in RUN.