結果
問題 | No.523 LED |
ユーザー |
![]() |
提出日時 | 2018-09-09 07:09:19 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 65 ms / 2,000 ms |
コード長 | 477 bytes |
コンパイル時間 | 1,915 ms |
コンパイル使用メモリ | 165,708 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-23 02:41:51 |
合計ジャッジ時間 | 3,068 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
#include <bits/stdc++.h> using namespace std; using int64 = long long; using uint64 = unsigned long long; constexpr int64 MOD = 1e9 + 7; constexpr int64 INV2 = 500000004; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int N; cin >> N; int64 ans = 1, num = 2 * N; for (int i = 0; i < N; i++) { (ans *= (((num * (num + MOD - 1)) % MOD) * INV2) % MOD) %= MOD; num -= 2; } cout << ans << endl; return 0; }