結果

問題 No.1471 Sort Queries
ユーザー stngstng
提出日時 2021-08-29 12:35:17
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 351 bytes
コンパイル時間 153 ms
コンパイル使用メモリ 82,660 KB
実行使用メモリ 95,624 KB
最終ジャッジ日時 2024-05-01 21:58:37
合計ジャッジ時間 20,331 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
59,472 KB
testcase_01 AC 35 ms
53,156 KB
testcase_02 AC 34 ms
53,356 KB
testcase_03 AC 38 ms
58,996 KB
testcase_04 AC 36 ms
53,004 KB
testcase_05 AC 37 ms
53,916 KB
testcase_06 AC 37 ms
53,372 KB
testcase_07 AC 36 ms
52,872 KB
testcase_08 AC 40 ms
60,000 KB
testcase_09 AC 39 ms
53,124 KB
testcase_10 AC 33 ms
52,824 KB
testcase_11 AC 35 ms
53,196 KB
testcase_12 AC 40 ms
59,424 KB
testcase_13 AC 321 ms
77,260 KB
testcase_14 AC 284 ms
76,800 KB
testcase_15 AC 488 ms
77,248 KB
testcase_16 AC 140 ms
76,660 KB
testcase_17 AC 247 ms
76,656 KB
testcase_18 AC 182 ms
76,404 KB
testcase_19 AC 156 ms
76,832 KB
testcase_20 AC 492 ms
77,436 KB
testcase_21 AC 264 ms
76,816 KB
testcase_22 AC 213 ms
76,476 KB
testcase_23 AC 1,044 ms
78,940 KB
testcase_24 AC 1,150 ms
78,820 KB
testcase_25 AC 1,640 ms
80,748 KB
testcase_26 AC 890 ms
78,768 KB
testcase_27 AC 1,517 ms
80,512 KB
testcase_28 AC 1,516 ms
80,788 KB
testcase_29 AC 886 ms
78,720 KB
testcase_30 AC 992 ms
78,828 KB
testcase_31 AC 1,554 ms
80,584 KB
testcase_32 AC 1,265 ms
79,736 KB
testcase_33 TLE -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
権限があれば一括ダウンロードができます

ソースコード

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