結果

問題 No.1471 Sort Queries
ユーザー yakeshibayakeshiba
提出日時 2021-06-09 21:39:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 415 bytes
コンパイル時間 402 ms
コンパイル使用メモリ 87,036 KB
実行使用メモリ 80,876 KB
最終ジャッジ日時 2023-08-19 08:05:30
合計ジャッジ時間 6,752 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,516 KB
testcase_01 AC 63 ms
71,216 KB
testcase_02 AC 64 ms
71,500 KB
testcase_03 AC 74 ms
75,956 KB
testcase_04 AC 63 ms
71,152 KB
testcase_05 AC 63 ms
71,380 KB
testcase_06 AC 63 ms
71,080 KB
testcase_07 AC 66 ms
71,244 KB
testcase_08 AC 73 ms
76,196 KB
testcase_09 AC 72 ms
76,476 KB
testcase_10 AC 65 ms
71,080 KB
testcase_11 AC 64 ms
71,436 KB
testcase_12 AC 71 ms
76,256 KB
testcase_13 AC 98 ms
76,904 KB
testcase_14 AC 94 ms
76,900 KB
testcase_15 AC 102 ms
78,716 KB
testcase_16 AC 96 ms
77,744 KB
testcase_17 AC 90 ms
76,764 KB
testcase_18 AC 87 ms
76,912 KB
testcase_19 AC 91 ms
77,012 KB
testcase_20 AC 96 ms
78,556 KB
testcase_21 AC 91 ms
77,464 KB
testcase_22 AC 88 ms
76,736 KB
testcase_23 AC 111 ms
80,264 KB
testcase_24 AC 110 ms
79,832 KB
testcase_25 AC 115 ms
79,856 KB
testcase_26 AC 112 ms
78,996 KB
testcase_27 AC 116 ms
80,296 KB
testcase_28 AC 114 ms
80,372 KB
testcase_29 AC 113 ms
79,476 KB
testcase_30 AC 107 ms
79,840 KB
testcase_31 AC 116 ms
79,628 KB
testcase_32 AC 115 ms
79,044 KB
testcase_33 AC 117 ms
80,420 KB
testcase_34 AC 123 ms
80,384 KB
testcase_35 AC 121 ms
80,284 KB
testcase_36 AC 122 ms
80,552 KB
testcase_37 AC 121 ms
80,364 KB
testcase_38 AC 130 ms
80,876 KB
testcase_39 AC 114 ms
80,212 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, q = map(int,input().split())
S = input()

alp = [[0]*26 for _ in range(n+1)]
for i,s in enumerate(S):
    i += 1
    for j in range(26):
        alp[i][j] = alp[i-1][j]
    alp[i][ord(s)-ord("a")] += 1
    

for j in range(q):
    l, r, x = map(int,input().split())
    now = 0
    for i in range(26):
        now += alp[r][i]-alp[l-1][i]
        if now >= x:
            print(chr(i+ord("a")))
            break
0