結果
| 問題 |
No.523 LED
|
| コンテスト | |
| ユーザー |
maesora
|
| 提出日時 | 2017-06-02 22:59:28 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 164 ms / 2,000 ms |
| コード長 | 661 bytes |
| コンパイル時間 | 706 ms |
| コンパイル使用メモリ | 85,908 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-21 23:55:40 |
| 合計ジャッジ時間 | 2,420 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
#include <cstdio>
#include <cmath>
#include <cstring>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <set>
#include <vector>
#include <sstream>
#include <typeinfo>
#include <fstream>
#include <climits>
#include <functional>
#define REP(i,n) for(int i = 0;i < n;i++)
using namespace std;
typedef long long ll;
const int INF = INT_MAX / 4;
const int p = 1e9 + 7;
const ll inv_elem_2 = 500000004;
int main(void)
{
cin.tie(0);
ios::sync_with_stdio(false);
int N;
cin >> N;
ll res = 1;
for(int i = 2;i <= N * 2;i++) {
res = (res * i) % p;
}
REP(i, N) res = (res * inv_elem_2) % p;
cout << res << "\n";
return 0;
}
maesora