Submission #29390
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #include <iostream> using namespace std; int dp[200][200] = {}; int main( void ){ int p,n; cin >> p >> n; dp[0][1] = 1; for ( int i = 1; i < n; i++){ for ( int j = 1; j <= 100; j++){ dp[i][j] = dp[i-1][j-1] + dp[i-1][j+1]; dp[i][j] %= 100005; } } for ( int i = 0; i < n; i++){ for ( int j = 0; j <= 100; j++){ cerr << dp[i][j] << " " ; } cerr << endl << endl; } cout << dp[n-1][p+1] << endl; } |
ステータス
項目 | データ |
---|---|
問題 | 0410 - メロディ作り |
ユーザー名 | nasatame |
投稿日時 | 2017-12-03 18:25:53 |
言語 | C++11 |
状態 | Accepted |
得点 | 10 |
ソースコード長 | 546 Byte |
最大実行時間 | 25 ms |
最大メモリ使用量 | 644 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 10 / 10 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
test01.txt | AC | 16 ms | 480 KB |
1
|
test02.txt | AC | 18 ms | 444 KB |
1
|
test03.txt | AC | 20 ms | 548 KB |
1
|
test04.txt | AC | 20 ms | 644 KB |
1
|
test05.txt | AC | 18 ms | 572 KB |
1
|
test06.txt | AC | 20 ms | 376 KB |
1
|
test07.txt | AC | 20 ms | 448 KB |
1
|
test08.txt | AC | 21 ms | 540 KB |
1
|
test09.txt | AC | 25 ms | 624 KB |
1
|
test10.txt | AC | 18 ms | 540 KB |
1
|