結果

問題 No.935 う し た ぷ に き あ く ん 笑 ビ - ム
ユーザー 👑 rin204rin204
提出日時 2022-01-18 23:51:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 141 ms / 2,000 ms
コード長 409 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 87,144 KB
実行使用メモリ 76,924 KB
最終ジャッジ日時 2023-08-15 07:45:34
合計ジャッジ時間 9,950 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 93 ms
76,660 KB
testcase_01 AC 98 ms
76,776 KB
testcase_02 AC 83 ms
76,148 KB
testcase_03 AC 100 ms
76,632 KB
testcase_04 AC 102 ms
76,548 KB
testcase_05 AC 89 ms
76,300 KB
testcase_06 AC 106 ms
76,836 KB
testcase_07 AC 112 ms
76,736 KB
testcase_08 AC 128 ms
76,904 KB
testcase_09 AC 120 ms
76,852 KB
testcase_10 AC 118 ms
76,592 KB
testcase_11 AC 113 ms
76,828 KB
testcase_12 AC 73 ms
71,196 KB
testcase_13 AC 72 ms
71,100 KB
testcase_14 AC 74 ms
71,276 KB
testcase_15 AC 73 ms
71,192 KB
testcase_16 AC 72 ms
71,148 KB
testcase_17 AC 113 ms
76,684 KB
testcase_18 AC 101 ms
76,452 KB
testcase_19 AC 107 ms
76,784 KB
testcase_20 AC 122 ms
76,372 KB
testcase_21 AC 92 ms
76,040 KB
testcase_22 AC 88 ms
75,844 KB
testcase_23 AC 74 ms
71,280 KB
testcase_24 AC 81 ms
75,668 KB
testcase_25 AC 82 ms
75,708 KB
testcase_26 AC 80 ms
75,708 KB
testcase_27 AC 76 ms
75,340 KB
testcase_28 AC 78 ms
75,912 KB
testcase_29 AC 80 ms
75,880 KB
testcase_30 AC 83 ms
75,764 KB
testcase_31 AC 81 ms
75,776 KB
testcase_32 AC 82 ms
75,960 KB
testcase_33 AC 110 ms
76,200 KB
testcase_34 AC 113 ms
76,676 KB
testcase_35 AC 116 ms
76,876 KB
testcase_36 AC 98 ms
76,400 KB
testcase_37 AC 111 ms
76,800 KB
testcase_38 AC 106 ms
76,740 KB
testcase_39 AC 125 ms
76,716 KB
testcase_40 AC 117 ms
76,812 KB
testcase_41 AC 127 ms
76,444 KB
testcase_42 AC 119 ms
76,696 KB
testcase_43 AC 130 ms
76,768 KB
testcase_44 AC 102 ms
76,700 KB
testcase_45 AC 141 ms
76,716 KB
testcase_46 AC 90 ms
76,488 KB
testcase_47 AC 102 ms
76,884 KB
testcase_48 AC 105 ms
76,504 KB
testcase_49 AC 107 ms
76,744 KB
testcase_50 AC 109 ms
76,600 KB
testcase_51 AC 113 ms
76,692 KB
testcase_52 AC 113 ms
76,704 KB
testcase_53 AC 128 ms
76,800 KB
testcase_54 AC 103 ms
76,436 KB
testcase_55 AC 88 ms
76,224 KB
testcase_56 AC 123 ms
76,744 KB
testcase_57 AC 117 ms
76,924 KB
testcase_58 AC 78 ms
70,892 KB
testcase_59 AC 77 ms
71,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect_right

n = int(input())
S = input()
A = list(map(int, input().split()))
inf = 1 << 60
min_ = [inf] * n
for i in range(n):
    tot = 0
    e = 0
    for j in range(i, n):
        tot += A[j]
        if S[j] == "E":
            min_[e] = min(min_[e], tot)
            e += 1
            
q = int(input())
K = list(map(int, input().split()))
for k in K:
    print(bisect_right(min_, k))
0