結果
| 問題 | No.129 お年玉(2) |
| コンテスト | |
| ユーザー |
Ronlynes
|
| 提出日時 | 2017-09-11 22:45:02 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 496 bytes |
| コンパイル時間 | 615 ms |
| コンパイル使用メモリ | 54,360 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-07 17:12:01 |
| 合計ジャッジ時間 | 7,128 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 4 WA * 5 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;
if(k != 0){
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 << before[k] << endl;
return 0;
}
Ronlynes