結果

問題 No.935 う し た ぷ に き あ く ん 笑 ビ - ム
ユーザー vwxyzvwxyz
提出日時 2024-04-19 19:13:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 138 ms / 2,000 ms
コード長 356 bytes
コンパイル時間 143 ms
コンパイル使用メモリ 82,400 KB
実行使用メモリ 73,088 KB
最終ジャッジ日時 2024-04-19 19:13:24
合計ジャッジ時間 6,013 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
66,560 KB
testcase_01 AC 61 ms
67,072 KB
testcase_02 AC 49 ms
61,312 KB
testcase_03 AC 62 ms
66,816 KB
testcase_04 AC 67 ms
70,016 KB
testcase_05 AC 62 ms
63,488 KB
testcase_06 AC 88 ms
66,304 KB
testcase_07 AC 78 ms
68,352 KB
testcase_08 AC 110 ms
72,192 KB
testcase_09 AC 110 ms
71,808 KB
testcase_10 AC 97 ms
71,040 KB
testcase_11 AC 120 ms
68,864 KB
testcase_12 AC 34 ms
52,352 KB
testcase_13 AC 43 ms
51,584 KB
testcase_14 AC 34 ms
51,820 KB
testcase_15 AC 35 ms
51,712 KB
testcase_16 AC 34 ms
51,840 KB
testcase_17 AC 67 ms
64,000 KB
testcase_18 AC 72 ms
68,608 KB
testcase_19 AC 103 ms
67,456 KB
testcase_20 AC 87 ms
71,168 KB
testcase_21 AC 57 ms
65,664 KB
testcase_22 AC 48 ms
61,056 KB
testcase_23 AC 53 ms
61,440 KB
testcase_24 AC 47 ms
61,824 KB
testcase_25 AC 47 ms
62,336 KB
testcase_26 AC 39 ms
58,752 KB
testcase_27 AC 35 ms
52,096 KB
testcase_28 AC 44 ms
61,056 KB
testcase_29 AC 49 ms
62,720 KB
testcase_30 AC 46 ms
61,952 KB
testcase_31 AC 43 ms
60,416 KB
testcase_32 AC 42 ms
59,392 KB
testcase_33 AC 109 ms
71,168 KB
testcase_34 AC 106 ms
71,936 KB
testcase_35 AC 100 ms
70,528 KB
testcase_36 AC 71 ms
70,528 KB
testcase_37 AC 82 ms
69,760 KB
testcase_38 AC 81 ms
67,584 KB
testcase_39 AC 105 ms
71,808 KB
testcase_40 AC 137 ms
73,088 KB
testcase_41 AC 138 ms
72,448 KB
testcase_42 AC 113 ms
68,844 KB
testcase_43 AC 115 ms
71,296 KB
testcase_44 AC 70 ms
66,816 KB
testcase_45 AC 116 ms
70,784 KB
testcase_46 AC 57 ms
65,280 KB
testcase_47 AC 101 ms
66,304 KB
testcase_48 AC 81 ms
70,784 KB
testcase_49 AC 71 ms
67,200 KB
testcase_50 AC 78 ms
67,712 KB
testcase_51 AC 98 ms
69,632 KB
testcase_52 AC 101 ms
71,040 KB
testcase_53 AC 108 ms
72,576 KB
testcase_54 AC 77 ms
67,584 KB
testcase_55 AC 52 ms
64,768 KB
testcase_56 AC 102 ms
67,328 KB
testcase_57 AC 86 ms
70,528 KB
testcase_58 AC 33 ms
51,712 KB
testcase_59 AC 33 ms
52,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
S=[0]+[s=="E" for s in input()]
for i in range(1,N+1):
    S[i]+=S[i-1]
A=[0]+list(map(int,input().split()))
for i in range(1,N+1):
    A[i]+=A[i-1]
Q=int(input())
K=list(map(int,input().split()))
for k in K:
    l=0
    ans=0
    for r in range(N+1):
        while A[r]-A[l]>k:
            l+=1
        ans=max(ans,S[r]-S[l])
    print(ans)
0