結果

問題 No.2694 The Early Bird Catches The Worm
ユーザー miztommiztom
提出日時 2024-03-22 22:27:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 160 ms / 2,000 ms
コード長 295 bytes
コンパイル時間 187 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 131,356 KB
最終ジャッジ日時 2024-03-22 22:27:36
合計ジャッジ時間 10,692 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,460 KB
testcase_01 AC 37 ms
53,460 KB
testcase_02 AC 37 ms
53,460 KB
testcase_03 AC 38 ms
53,460 KB
testcase_04 AC 38 ms
53,460 KB
testcase_05 AC 37 ms
53,460 KB
testcase_06 AC 43 ms
59,444 KB
testcase_07 AC 38 ms
53,456 KB
testcase_08 AC 43 ms
59,460 KB
testcase_09 AC 39 ms
53,460 KB
testcase_10 AC 38 ms
53,460 KB
testcase_11 AC 37 ms
53,460 KB
testcase_12 AC 38 ms
53,460 KB
testcase_13 AC 38 ms
53,460 KB
testcase_14 AC 39 ms
53,460 KB
testcase_15 AC 39 ms
53,460 KB
testcase_16 AC 39 ms
53,460 KB
testcase_17 AC 39 ms
53,460 KB
testcase_18 AC 39 ms
53,460 KB
testcase_19 AC 38 ms
53,460 KB
testcase_20 AC 39 ms
53,460 KB
testcase_21 AC 39 ms
53,460 KB
testcase_22 AC 38 ms
53,460 KB
testcase_23 AC 38 ms
53,460 KB
testcase_24 AC 78 ms
89,644 KB
testcase_25 AC 74 ms
86,164 KB
testcase_26 AC 82 ms
92,120 KB
testcase_27 AC 95 ms
98,656 KB
testcase_28 AC 92 ms
98,012 KB
testcase_29 AC 63 ms
78,320 KB
testcase_30 AC 121 ms
102,700 KB
testcase_31 AC 95 ms
98,760 KB
testcase_32 AC 123 ms
103,100 KB
testcase_33 AC 120 ms
103,072 KB
testcase_34 AC 47 ms
64,244 KB
testcase_35 AC 91 ms
97,376 KB
testcase_36 AC 96 ms
98,816 KB
testcase_37 AC 133 ms
107,256 KB
testcase_38 AC 107 ms
97,904 KB
testcase_39 AC 61 ms
77,156 KB
testcase_40 AC 95 ms
98,724 KB
testcase_41 AC 63 ms
81,260 KB
testcase_42 AC 46 ms
62,196 KB
testcase_43 AC 54 ms
70,476 KB
testcase_44 AC 130 ms
106,488 KB
testcase_45 AC 129 ms
106,484 KB
testcase_46 AC 70 ms
86,656 KB
testcase_47 AC 78 ms
89,760 KB
testcase_48 AC 97 ms
98,012 KB
testcase_49 AC 130 ms
113,564 KB
testcase_50 AC 130 ms
113,564 KB
testcase_51 AC 137 ms
113,564 KB
testcase_52 AC 129 ms
113,564 KB
testcase_53 AC 132 ms
113,584 KB
testcase_54 AC 146 ms
130,972 KB
testcase_55 AC 160 ms
131,356 KB
testcase_56 AC 148 ms
131,352 KB
testcase_57 AC 147 ms
131,224 KB
testcase_58 AC 151 ms
130,968 KB
testcase_59 AC 144 ms
130,972 KB
testcase_60 AC 147 ms
131,352 KB
testcase_61 AC 148 ms
131,228 KB
testcase_62 AC 149 ms
131,228 KB
testcase_63 AC 151 ms
131,228 KB
testcase_64 AC 145 ms
131,224 KB
testcase_65 AC 146 ms
130,976 KB
testcase_66 AC 153 ms
131,228 KB
testcase_67 AC 149 ms
130,972 KB
testcase_68 AC 149 ms
131,228 KB
testcase_69 AC 138 ms
126,748 KB
testcase_70 AC 136 ms
126,744 KB
testcase_71 AC 136 ms
126,748 KB
testcase_72 AC 136 ms
126,748 KB
testcase_73 AC 149 ms
126,748 KB
testcase_74 AC 94 ms
102,520 KB
testcase_75 AC 137 ms
126,744 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,h=map(int,input().split())
a=[*map(int,input().split()),1<<30]
b=[*map(int,input().split()),1<<30]
m=c=s=r=d=p=0
for i in range(n):
    while s<=h:
        m=max(r,m)
        c+=1
        r+=a[p]
        d+=b[p]
        s+=c*b[p]
        p+=1
    c-=1
    r-=a[i]
    s-=d
    d-=b[i]
print(m)
0