結果

問題 No.935 う し た ぷ に き あ く ん 笑 ビ - ム
ユーザー flippergoflippergo
提出日時 2020-12-26 12:45:32
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 704 bytes
コンパイル時間 246 ms
コンパイル使用メモリ 81,652 KB
実行使用メモリ 74,168 KB
最終ジャッジ日時 2023-10-24 20:49:44
合計ジャッジ時間 10,208 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 132 ms
66,508 KB
testcase_07 WA -
testcase_08 AC 243 ms
68,708 KB
testcase_09 AC 170 ms
68,700 KB
testcase_10 AC 193 ms
68,700 KB
testcase_11 WA -
testcase_12 AC 35 ms
53,432 KB
testcase_13 AC 34 ms
53,432 KB
testcase_14 AC 33 ms
53,432 KB
testcase_15 WA -
testcase_16 AC 34 ms
53,432 KB
testcase_17 AC 252 ms
66,620 KB
testcase_18 AC 97 ms
68,700 KB
testcase_19 AC 161 ms
68,704 KB
testcase_20 AC 145 ms
70,848 KB
testcase_21 AC 59 ms
64,328 KB
testcase_22 AC 49 ms
63,732 KB
testcase_23 WA -
testcase_24 AC 46 ms
62,252 KB
testcase_25 AC 47 ms
62,264 KB
testcase_26 AC 40 ms
59,480 KB
testcase_27 AC 38 ms
59,340 KB
testcase_28 WA -
testcase_29 AC 46 ms
62,264 KB
testcase_30 AC 46 ms
62,264 KB
testcase_31 WA -
testcase_32 AC 49 ms
64,392 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 83 ms
66,632 KB
testcase_37 WA -
testcase_38 AC 136 ms
66,512 KB
testcase_39 WA -
testcase_40 AC 370 ms
73,380 KB
testcase_41 WA -
testcase_42 AC 187 ms
68,688 KB
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 AC 116 ms
71,368 KB
testcase_49 WA -
testcase_50 AC 168 ms
68,720 KB
testcase_51 WA -
testcase_52 WA -
testcase_53 AC 285 ms
71,308 KB
testcase_54 AC 96 ms
71,316 KB
testcase_55 WA -
testcase_56 WA -
testcase_57 WA -
testcase_58 AC 35 ms
53,432 KB
testcase_59 AC 33 ms
53,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
S = input().strip()
A = list(map(int,input().split()))
Q = int(input())
K = list(map(int,input().split()))
BS = [0 for _ in range(N+1)]
for i in range(1,N+1):
    if S[i-1]=="E":
        BS[i] = BS[i-1]+1
    else:
        BS[i] = BS[i-1]
BA = [0 for _ in range(N+1)]
for i in range(1,N+1):
    BA[i] = BA[i-1]+A[i-1]
for j in range(Q):
    k = K[j]
    cmax = 0
    for i in range(N):
        high = N
        low = i
        while high-low>1:
            mid = (high+low)//2
            if mid+1<=N and BA[mid+1]-BA[i]>k:
                high = mid
            else:
                low = mid
        ind = high
        cnt = BS[high]-BS[i]
        cmax = max(cmax,cnt)
    print(cmax)
0