結果
問題 |
No.8046 yukicoderの過去問
|
ユーザー |
![]() |
提出日時 | 2019-04-01 22:07:03 |
言語 | C (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 390 bytes |
コンパイル時間 | 170 ms |
コンパイル使用メモリ | 29,696 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-11-27 02:58:43 |
合計ジャッジ時間 | 9,665 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 TLE * 3 |
ソースコード
#include <stdio.h> int main(void){ // Your code here! int k,n; scanf("%d",&k); scanf("%d",&n); int x[100000]; for(int i=0;i<n;i++){ scanf("%d",&x[i]); } int c[200000]; c[0]=1; for(int i=0;i<k;i++){ for(int j=0;j<n;j++){ int xx=x[j]; c[i+xx]=(c[i+xx]+c[i])%1000000007; } } printf("%d",c[k]); }