結果

問題 No.1471 Sort Queries
ユーザー stngstng
提出日時 2021-08-29 12:35:17
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 351 bytes
コンパイル時間 421 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 142,848 KB
最終ジャッジ日時 2024-11-22 04:58:48
合計ジャッジ時間 38,104 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
57,216 KB
testcase_01 AC 43 ms
140,800 KB
testcase_02 AC 42 ms
57,344 KB
testcase_03 AC 48 ms
141,696 KB
testcase_04 AC 44 ms
58,240 KB
testcase_05 AC 43 ms
142,848 KB
testcase_06 AC 42 ms
57,472 KB
testcase_07 AC 43 ms
52,224 KB
testcase_08 AC 49 ms
58,752 KB
testcase_09 AC 43 ms
52,480 KB
testcase_10 AC 42 ms
52,096 KB
testcase_11 AC 44 ms
52,736 KB
testcase_12 AC 48 ms
58,496 KB
testcase_13 AC 376 ms
77,184 KB
testcase_14 AC 325 ms
76,800 KB
testcase_15 AC 541 ms
77,568 KB
testcase_16 AC 161 ms
76,416 KB
testcase_17 AC 288 ms
76,544 KB
testcase_18 AC 216 ms
76,416 KB
testcase_19 AC 192 ms
76,800 KB
testcase_20 AC 554 ms
77,696 KB
testcase_21 AC 301 ms
76,544 KB
testcase_22 AC 256 ms
76,672 KB
testcase_23 AC 1,178 ms
79,104 KB
testcase_24 AC 1,160 ms
78,848 KB
testcase_25 AC 1,853 ms
80,896 KB
testcase_26 AC 1,001 ms
78,592 KB
testcase_27 AC 1,707 ms
80,640 KB
testcase_28 AC 1,684 ms
81,152 KB
testcase_29 AC 1,000 ms
78,464 KB
testcase_30 AC 1,103 ms
78,592 KB
testcase_31 AC 1,725 ms
80,640 KB
testcase_32 AC 1,419 ms
79,488 KB
testcase_33 TLE -
testcase_34 TLE -
testcase_35 TLE -
testcase_36 TLE -
testcase_37 TLE -
testcase_38 AC 1,222 ms
110,208 KB
testcase_39 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect

n,q = map(int,input().split())
s = input()
lrx = [[int(i)-1 for i in input().split()] for j in range(q)]

sli = [0]*(n)

for i in range(n):
    sli[i] = ord(s[i])
    
for i in range(q):
    l,r,x = lrx[i][0],lrx[i][1],lrx[i][2]
    tmp = []
    for j in range(r-l+1):
        tmp.append(sli[l+j])
    tmp.sort()
    print(chr(tmp[x]))
0