問題一覧 > 通常問題

No.895 MESE

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 136
作問者 : fuppy_kyopro / テスター : e869120
お気に入りにしたユーザー ProblemId : 3387 / 自分の提出
問題文最終更新日: 2019-09-15 14:30:45
MESE
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Show the original
yukicoder contest 225 (順位表) の他の問題:

Problem Statement

You are given three positive integers $a, b, c$. Find the sum of $z$ over all triples of positive integers $(x, y, z)$ satisfying the conditions below.
Since the answer can be very large, output it modulo $10^9+7$.

  • When $x, y, z$ are written in binary, the numbers of digits equal to 1 are $a, b, c$, respectively.
  • $x > y > z$ holds.
  • $(x~or~y~or~z) = 2^{a + b + c} - 1$ holds.
Here, $or$ denotes the bitwise OR.

Input

$a\ b\ c$

  • $1 ≤ a, b, c ≤ 10^5$
  • $a, b, c$ are all integers.

Output

Output on one line the sum of $z$ over all triples $(x, y, z)$ satisfying the conditions, modulo $10^9+7$.
Print a newline at the end.

Sample

Sample 1
Input
2 2 1
Output
17

The triples $(x, y, z)$ satisfying the conditions are, in binary,
(11000, 00110, 00001), (11000, 00101, 00010), (10100, 01010, 00001), (10100, 01001, 00010),
(10010, 01100, 00001), (10010, 01001, 00100), (10001, 01100, 00010), (10001, 01010, 00100)
for a total of $8$ triples.
The required sum of $z$ is $1+2+1+2+1+4+2+4=17$.

Sample 2
Input
1 1 1
Output
1

The only triple $(x, y, z)$ satisfying the conditions is $(4, 2, 1)$.

Sample 3
Input
100 100 100
Output
208072283

Be careful to output the value modulo $10^9+7$.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。