Submission #19919


ソースコード

1
2
3
4
5
6
a[25],i,j,f,s;main(n,k)
{
for(scanf("%d%d",&n,&k);~scanf("%d",a+j++););
for(;i<1<<n;f|=k==s,i++)for(s=j=0;j<n;j++)s+=i&1<<j?a[j]:0;
puts(f?"OK":"NG");
}

ステータス

項目 データ
問題 0064 - 足し算できる?
ユーザー名 kotatsugame
投稿日時 2017-06-20 02:06:34
言語 C
状態 Accepted
得点 5
ソースコード長 160 Byte
最大実行時間 60 ms
最大メモリ使用量 592 KB

セット

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

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
AddInput1.txt AC 16 ms 380 KB
1
AddInput2.txt AC 22 ms 404 KB
1
AddInput3.txt AC 11 ms 592 KB
1
AddInput4.txt AC 60 ms 420 KB
1
AddInput5.txt AC 27 ms 440 KB
1
AddInput6.txt AC 11 ms 364 KB
1