結果

問題 No.1471 Sort Queries
ユーザー MitarushiMitarushi
提出日時 2020-11-24 22:25:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 154 ms / 2,000 ms
コード長 390 bytes
コンパイル時間 343 ms
コンパイル使用メモリ 86,784 KB
実行使用メモリ 81,728 KB
最終ジャッジ日時 2023-08-22 04:06:04
合計ジャッジ時間 7,429 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,292 KB
testcase_01 AC 71 ms
71,244 KB
testcase_02 AC 70 ms
71,296 KB
testcase_03 AC 77 ms
75,280 KB
testcase_04 AC 77 ms
75,716 KB
testcase_05 AC 74 ms
75,312 KB
testcase_06 AC 69 ms
71,096 KB
testcase_07 AC 74 ms
74,904 KB
testcase_08 AC 78 ms
76,168 KB
testcase_09 AC 74 ms
74,992 KB
testcase_10 AC 70 ms
71,372 KB
testcase_11 AC 77 ms
75,540 KB
testcase_12 AC 77 ms
75,532 KB
testcase_13 AC 119 ms
79,008 KB
testcase_14 AC 109 ms
78,632 KB
testcase_15 AC 118 ms
78,776 KB
testcase_16 AC 110 ms
77,780 KB
testcase_17 AC 108 ms
79,224 KB
testcase_18 AC 103 ms
78,696 KB
testcase_19 AC 110 ms
78,032 KB
testcase_20 AC 117 ms
78,808 KB
testcase_21 AC 108 ms
78,364 KB
testcase_22 AC 106 ms
78,808 KB
testcase_23 AC 131 ms
80,104 KB
testcase_24 AC 132 ms
80,024 KB
testcase_25 AC 139 ms
80,132 KB
testcase_26 AC 133 ms
79,188 KB
testcase_27 AC 133 ms
80,776 KB
testcase_28 AC 135 ms
80,852 KB
testcase_29 AC 132 ms
79,496 KB
testcase_30 AC 122 ms
79,816 KB
testcase_31 AC 143 ms
79,744 KB
testcase_32 AC 143 ms
79,648 KB
testcase_33 AC 147 ms
80,936 KB
testcase_34 AC 151 ms
80,708 KB
testcase_35 AC 151 ms
81,728 KB
testcase_36 AC 145 ms
80,428 KB
testcase_37 AC 146 ms
80,964 KB
testcase_38 AC 154 ms
80,644 KB
testcase_39 AC 130 ms
80,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, q = map(int, input().split())
s = input()
cut = [[0] * 26]
for i in s:
    cut.append(cut[-1][:])
    cut[-1][ord(i) - ord('a')] += 1

for _ in range(q):
    l, r, x = [int(i) for i in input().split()]
    count = [cut[r][i] - cut[l-1][i] for i in range(26)]

    for ind, i in enumerate(count):
        if i >= x:
            print(chr(ind + ord("a")))
            break
        x -= i
0