結果
| 問題 | No.523 LED |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2026-05-16 20:18:31 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 605 bytes |
| 記録 | |
| コンパイル時間 | 3,494 ms |
| コンパイル使用メモリ | 330,288 KB |
| 実行使用メモリ | 19,648 KB |
| 最終ジャッジ日時 | 2026-05-16 20:19:18 |
| 合計ジャッジ時間 | 11,932 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 24 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
typedef long long LL;
LL qmi(LL a, LL k, LL p) {
LL res = 1;
while (k) {
if (k & 1)
res = (LL)res * a % p;
a = (LL)a * a % p;
k >>= 1;
}
return res;
}
LL qjie(LL x, LL p) {
LL ans = 1;
for (LL i = 1; i <= x; ++i) {
ans = ans * i;
ans = ans % p;
}
return ans;
}
int main() {
freopen("led.in", "r", stdin);
freopen("led.out", "w", stdout);
LL n;
cin >> n;
cout << (qjie(2 * n, MOD)) / (qmi(2, n, MOD)) % MOD << endl;
return 0;
}
vjudge1