結果

問題 No.616 へんなソート
ユーザー pluto77pluto77
提出日時 2018-03-02 09:29:27
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 352 ms / 2,000 ms
コード長 396 bytes
コンパイル時間 1,373 ms
コンパイル使用メモリ 77,652 KB
実行使用メモリ 81,576 KB
最終ジャッジ日時 2023-08-28 23:37:42
合計ジャッジ時間 7,540 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
81,128 KB
testcase_01 AC 86 ms
81,096 KB
testcase_02 AC 93 ms
80,880 KB
testcase_03 AC 104 ms
81,276 KB
testcase_04 AC 114 ms
80,928 KB
testcase_05 AC 82 ms
81,248 KB
testcase_06 AC 111 ms
80,904 KB
testcase_07 AC 96 ms
80,996 KB
testcase_08 AC 113 ms
81,012 KB
testcase_09 AC 123 ms
80,928 KB
testcase_10 AC 100 ms
81,192 KB
testcase_11 AC 122 ms
81,148 KB
testcase_12 AC 157 ms
81,136 KB
testcase_13 AC 299 ms
81,384 KB
testcase_14 AC 141 ms
80,940 KB
testcase_15 AC 97 ms
81,120 KB
testcase_16 AC 124 ms
81,076 KB
testcase_17 AC 291 ms
81,512 KB
testcase_18 AC 237 ms
81,088 KB
testcase_19 AC 223 ms
81,128 KB
testcase_20 AC 112 ms
81,308 KB
testcase_21 AC 133 ms
80,972 KB
testcase_22 AC 191 ms
81,144 KB
testcase_23 AC 81 ms
81,108 KB
testcase_24 AC 81 ms
81,164 KB
testcase_25 AC 81 ms
80,864 KB
testcase_26 AC 186 ms
81,132 KB
testcase_27 AC 181 ms
80,972 KB
testcase_28 AC 349 ms
81,476 KB
testcase_29 AC 352 ms
81,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki616

f=[0 for i in xrange(100001)]
s=[0 for i in xrange(100001)]
t=[0 for i in xrange(100001)]
mod=10**9+7
n,k=map(int,raw_input().split())
dmy=map(int,raw_input().split())
f[0]=1
for i in xrange(n):
 for j in xrange(100000):
  s[j+1]=(s[j]+f[j])%mod
  if j-i>=0:
   t[j]=(s[j+1]-s[j-i]+mod)%mod
  else:
   t[j]=(s[j+1]+mod)%mod
 f,t=t,f
res=0
for i in xrange(k+1):
 res+=f[i]
print res%mod
0