結果

問題 No.129 お年玉(2)
ユーザー chocopuuchocopuu
提出日時 2018-10-19 01:30:16
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,136 bytes
コンパイル時間 1,462 ms
コンパイル使用メモリ 162,048 KB
実行使用メモリ 433,152 KB
最終ジャッジ日時 2024-04-25 09:24:57
合計ジャッジ時間 40,155 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 723 ms
433,024 KB
testcase_01 WA -
testcase_02 AC 806 ms
433,024 KB
testcase_03 AC 807 ms
433,024 KB
testcase_04 AC 726 ms
433,024 KB
testcase_05 AC 731 ms
432,896 KB
testcase_06 AC 723 ms
432,896 KB
testcase_07 AC 726 ms
433,024 KB
testcase_08 AC 730 ms
433,024 KB
testcase_09 AC 722 ms
432,896 KB
testcase_10 AC 733 ms
433,152 KB
testcase_11 AC 719 ms
433,024 KB
testcase_12 AC 726 ms
433,024 KB
testcase_13 AC 720 ms
433,024 KB
testcase_14 AC 720 ms
432,768 KB
testcase_15 AC 723 ms
432,768 KB
testcase_16 AC 740 ms
432,896 KB
testcase_17 AC 712 ms
432,896 KB
testcase_18 AC 727 ms
433,024 KB
testcase_19 AC 723 ms
433,152 KB
testcase_20 AC 733 ms
432,896 KB
testcase_21 AC 727 ms
433,024 KB
testcase_22 AC 719 ms
433,024 KB
testcase_23 AC 718 ms
432,896 KB
testcase_24 AC 724 ms
433,024 KB
testcase_25 AC 744 ms
432,768 KB
testcase_26 AC 723 ms
432,896 KB
testcase_27 AC 737 ms
433,024 KB
testcase_28 AC 723 ms
433,024 KB
testcase_29 AC 721 ms
432,896 KB
testcase_30 AC 708 ms
433,024 KB
testcase_31 AC 720 ms
433,024 KB
testcase_32 AC 724 ms
433,024 KB
testcase_33 AC 758 ms
433,024 KB
testcase_34 AC 737 ms
433,024 KB
testcase_35 AC 747 ms
433,024 KB
testcase_36 AC 728 ms
432,896 KB
testcase_37 AC 719 ms
433,024 KB
testcase_38 AC 716 ms
432,896 KB
testcase_39 AC 729 ms
433,024 KB
testcase_40 AC 732 ms
433,024 KB
testcase_41 AC 712 ms
433,024 KB
testcase_42 AC 719 ms
432,896 KB
testcase_43 AC 707 ms
432,896 KB
testcase_44 AC 702 ms
433,024 KB
testcase_45 AC 708 ms
433,024 KB
testcase_46 AC 705 ms
433,024 KB
testcase_47 AC 730 ms
433,024 KB
testcase_48 AC 733 ms
433,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

#define int long long

#define rep(i,s,n) for(int i = s;i<n;i++)
#define repe(i,s,n) for(int i = s;i<=n;i++)
#define rrep(i,s,n) for(int i = (n)-1;i>=(s);i--)
#define all(v) (v).begin(),(v).end()
#define pb push_back
#define fi first
#define se second
#define chmin(a,b) a=min((a),(b))
#define chmax(a,b) a=max((a),(b))
typedef long long ll;
typedef pair<int,int>pint;
typedef vector<int>vint;
typedef vector<pint>vpint;
typedef pair<pint,int> P1;
typedef pair<int,pint> P2;
typedef pair<pint,pint>PP;
static const ll maxLL = (ll)1 << 62;
const ll MOD=1000000007;
const ll INF=1e18;
int dx[]={0,0,1,-1};
int dy[]={-1,1,0,0};

int N,M;
int mod=1e9;
int a[10010][10010];

signed main(){
    cin.tie(0);
	ios::sync_with_stdio(false);
    cin>>N>>M;
    N%=1000*M;
    N/=1000;
    rep(i,0,10000)rep(j,0,i+1){
        if(j==0)a[i][j]=1;
        else a[i][j]=(a[i-1][j]+a[i-1][j-1])%mod;
    }
    cout<<a[M][N]<<endl;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    return 0;
}
0