Submission #11680
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #include<iostream> using namespace std; int main(){ int dp[101][101]={0}; int p; int n; cin>>p>>n; n--; dp[0][0]=1; for ( int i=0;i<n;i++){ for ( int j=0;j<=i;j++){ dp[i+1][j+1]+=dp[i][j]%100005; if (p-1>=0){ dp[i+1][j-1]+=dp[i][j]%100005; } } } cout<<dp[n][p]%100005<<endl; return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 0410 - メロディ作り |
ユーザー名 | ei1630 |
投稿日時 | 2017-01-12 15:37:06 |
言語 | C++11 |
状態 | Accepted |
得点 | 10 |
ソースコード長 | 351 Byte |
最大実行時間 | 32 ms |
最大メモリ使用量 | 676 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 10 / 10 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
test01.txt | AC | 19 ms | 480 KB |
1
|
test02.txt | AC | 32 ms | 676 KB |
1
|
test03.txt | AC | 11 ms | 616 KB |
1
|
test04.txt | AC | 16 ms | 564 KB |
1
|
test05.txt | AC | 22 ms | 640 KB |
1
|
test06.txt | AC | 21 ms | 584 KB |
1
|
test07.txt | AC | 13 ms | 532 KB |
1
|
test08.txt | AC | 12 ms | 608 KB |
1
|
test09.txt | AC | 16 ms | 556 KB |
1
|
test10.txt | AC | 18 ms | 628 KB |
1
|