Submission #37124
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #include<iostream> #include<cstdio> using namespace std; int dp[105][105]; int main(){ int p,n; scanf ( "%d %d" ,&p,&n); dp[1][1]=1; for ( int i=2;i<=102;i++){ for ( int j=1;j<=102;j++){ dp[i][j]=(dp[i-1][j-1]+dp[i-1][j+1])%100005; } } printf ( "%d\n" ,dp[n][p+1]); return 0; } |
ステータス
項目 | データ |
---|---|
問題 | 0410 - メロディ作り |
ユーザー名 | ei1728 |
投稿日時 | 2018-06-12 17:21:00 |
言語 | C++11 |
状態 | Accepted |
得点 | 10 |
ソースコード長 | 322 Byte |
最大実行時間 | 35 ms |
最大メモリ使用量 | 672 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 10 / 10 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
test01.txt | AC | 28 ms | 480 KB |
1
|
test02.txt | AC | 30 ms | 420 KB |
1
|
test03.txt | AC | 22 ms | 484 KB |
1
|
test04.txt | AC | 21 ms | 416 KB |
1
|
test05.txt | AC | 22 ms | 604 KB |
1
|
test06.txt | AC | 22 ms | 544 KB |
1
|
test07.txt | AC | 35 ms | 604 KB |
1
|
test08.txt | AC | 19 ms | 540 KB |
1
|
test09.txt | AC | 24 ms | 604 KB |
1
|
test10.txt | AC | 23 ms | 672 KB |
1
|