結果
| 問題 | No.129 お年玉(2) |
| コンテスト | |
| ユーザー |
Ronlynes
|
| 提出日時 | 2017-09-11 22:42:18 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 437 bytes |
| コンパイル時間 | 527 ms |
| コンパイル使用メモリ | 54,884 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-07 17:11:54 |
| 合計ジャッジ時間 | 7,361 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | WA * 9 RE * 37 |
ソースコード
#include <iostream>
using namespace std;
int main(void){
int n,m;
cin >> n >> m;
int k = (n/1000)%m;
int before[1003], after[1003];
before[0] = 1;
for(int i=1; i<=m; i++){
for(int j=1; j<=i; j++){
after[j] = before[j-1]+before[j];
}
before[0] = 1;
for(int j=1; j<=i; j++){
before[j] = after[j];
}
}
cout << after[k] << endl;
return 0;
}
Ronlynes