結果

問題 No.420 mod2漸化式
ユーザー nanophoto12nanophoto12
提出日時 2016-09-11 14:06:42
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 892 bytes
コンパイル時間 544 ms
コンパイル使用メモリ 82,008 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-28 12:03:17
合計ジャッジ時間 1,407 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 WA -
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 WA -
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 1 ms
5,376 KB
testcase_14 AC 1 ms
5,376 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 1 ms
5,376 KB
testcase_34 AC 2 ms
5,376 KB
testcase_35 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cmath>
#include <vector>
#include <map>
#include <functional>
#include <queue>
#include <iostream>
#include <string>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <cstdint>
#include <climits>

using namespace std;

#define ll long long int
#define ti4 tuple<int,int,int,int>
#define pii pair<ll,ll>

template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
    std::fill( (T*)array, (T*)(array+N), val );
}

ll comb(ll n, ll a)
{
    ll c = 1;
    for(ll i = n;i > n - a;i--)
    {
        c *= i;
    }
    for(ll i = 1;i < 1 + a;i++)
    {
        c /= i;
    }
    return c;
}

int main()
{
    ll x;
    cin >> x;
    
    if(x > 31)
    {
        cout << "0 0" << endl;
        return 0;
    }
    ll count = comb(31, x);
    ll m = INT_MAX;
    m *= comb(30, x-1);
    cout << count << " " << m << endl;
    return 0;
    
}
0