結果

問題 No.129 お年玉(2)
ユーザー tnoda_tnoda_
提出日時 2015-08-12 00:58:17
言語 C++11
(gcc 11.4.0)
結果
MLE  
実行時間 -
コード長 893 bytes
コンパイル時間 743 ms
コンパイル使用メモリ 83,488 KB
実行使用メモリ 785,812 KB
最終ジャッジ日時 2023-09-25 08:18:12
合計ジャッジ時間 48,584 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 MLE -
testcase_01 MLE -
testcase_02 MLE -
testcase_03 MLE -
testcase_04 MLE -
testcase_05 MLE -
testcase_06 MLE -
testcase_07 MLE -
testcase_08 MLE -
testcase_09 MLE -
testcase_10 MLE -
testcase_11 MLE -
testcase_12 MLE -
testcase_13 MLE -
testcase_14 MLE -
testcase_15 MLE -
testcase_16 MLE -
testcase_17 MLE -
testcase_18 MLE -
testcase_19 MLE -
testcase_20 MLE -
testcase_21 MLE -
testcase_22 MLE -
testcase_23 MLE -
testcase_24 MLE -
testcase_25 MLE -
testcase_26 MLE -
testcase_27 MLE -
testcase_28 MLE -
testcase_29 MLE -
testcase_30 MLE -
testcase_31 MLE -
testcase_32 MLE -
testcase_33 MLE -
testcase_34 MLE -
testcase_35 MLE -
testcase_36 MLE -
testcase_37 MLE -
testcase_38 MLE -
testcase_39 MLE -
testcase_40 MLE -
testcase_41 MLE -
testcase_42 MLE -
testcase_43 MLE -
testcase_44 MLE -
testcase_45 MLE -
testcase_46 MLE -
testcase_47 MLE -
testcase_48 MLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <cmath>
#include <climits>
#include <iostream>
#include <iomanip>
#include <list>
#include <stack>
#include <queue>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <utility>
#include <algorithm>
#include <numeric>
#include <functional>

#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define ALL(a) (a).begin(),(a).end()

using namespace std;
typedef long long ll;

ll N, M;
ll dp[10010][10010];
ll P = 1000000000;

int main(int argc, char *argv[])
{
  cin.tie(0);
  ios::sync_with_stdio(false);

  cin >> N >> M;
  N /= 1000;
  N %= M;
  dp[0][0] = 1;
  REP(i,10001) REP(j,10001) {
    dp[i+1][j] += dp[i][j];
    dp[i+1][j+1] += dp[i][j];
  }
  cout << dp[M][N] << endl;
  return 0;
}
0