Submission #03985


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include<iostream>
using namespace std;
main(){
int a[101]={0},b[101],n,p,i,j;
a[0]=1;
cin>>p>>n;
for(i=1;i<n;i++){
b[0]=a[1];
for(j=1;j<=i;j++){
b[j]=(a[j-1]+a[j+1])%100005;
}
for(j=0;j<=i;j++){
a[j]=b[j];
}
}
cout<<a[p]<<endl;
}

ステータス

項目 データ
問題 0410 - メロディ作り
ユーザー名 ei1516
投稿日時 2016-05-25 12:35:14
言語 C++
状態 Accepted
得点 10
ソースコード長 292 Byte
最大実行時間 28 ms
最大メモリ使用量 596 KB

セット

セット 得点 Cases
1 ALL 10 / 10 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
test01.txt AC 28 ms 476 KB
1
test02.txt AC 20 ms 456 KB
1
test03.txt AC 11 ms 564 KB
1
test04.txt AC 19 ms 544 KB
1
test05.txt AC 12 ms 520 KB
1
test06.txt AC 12 ms 364 KB
1
test07.txt AC 11 ms 596 KB
1
test08.txt AC 11 ms 440 KB
1
test09.txt AC 13 ms 548 KB
1
test10.txt AC 10 ms 524 KB
1