結果

問題 No.523 LED
ユーザー xxxasdfghjkxxxasdfghjk
提出日時 2018-08-17 21:28:05
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 107 ms / 2,000 ms
コード長 689 bytes
コンパイル時間 575 ms
コンパイル使用メモリ 72,420 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-19 01:40:09
合計ジャッジ時間 2,099 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 3 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 107 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 22 ms
5,376 KB
testcase_14 AC 1 ms
5,376 KB
testcase_15 AC 2 ms
5,376 KB
testcase_16 AC 2 ms
5,376 KB
testcase_17 AC 1 ms
5,376 KB
testcase_18 AC 107 ms
5,376 KB
testcase_19 AC 39 ms
5,376 KB
testcase_20 AC 35 ms
5,376 KB
testcase_21 AC 81 ms
5,376 KB
testcase_22 AC 91 ms
5,376 KB
testcase_23 AC 90 ms
5,376 KB
testcase_24 AC 3 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<cstdio>
#include<queue>
#include<utility>
#include<cstring>
#include<stack>
#include<algorithm>
#include<cmath>
#include<iostream>
#include<map>
#define MAX_N 100001
#define INF_INT 2147483647
#define INF_LL 9223372036854775807
#define REP(i,n) for(int i=0;i<(int)(n);i++)
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> P;
ll bpow(ll a,ll x,ll mod){
  int res=1;
  while(x){
    if(x & 1)
      res = res*a % mod;
    a = a*a % mod;
    x >>= 1;
  }
  return res;
}

int main()
{
  ll res=1,N,MOD=10E8+7;
  cin >> N;
  for(int i=1;i<=2*N;i++){
    res = (res*i) % MOD;
  }
  res = res*bpow(bpow(2,N,MOD),MOD-2,MOD) % MOD;
  cout << res << endl;
  return 0;
}

0