結果
問題 | No.129 お年玉(2) |
ユーザー |
![]() |
提出日時 | 2015-08-12 00:58:17 |
言語 | C++11 (gcc 13.3.0) |
結果 |
MLE
|
実行時間 | - |
コード長 | 893 bytes |
コンパイル時間 | 611 ms |
コンパイル使用メモリ | 86,080 KB |
実行使用メモリ | 785,664 KB |
最終ジャッジ日時 | 2024-07-18 06:49:37 |
合計ジャッジ時間 | 49,929 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | MLE * 3 |
other | MLE * 46 |
ソースコード
#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; }