結果

問題 No.1471 Sort Queries
ユーザー stngstng
提出日時 2021-08-29 12:44:10
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 376 bytes
コンパイル時間 207 ms
コンパイル使用メモリ 81,792 KB
実行使用メモリ 85,888 KB
最終ジャッジ日時 2024-05-01 22:00:52
合計ジャッジ時間 19,453 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
57,344 KB
testcase_01 AC 41 ms
51,712 KB
testcase_02 AC 38 ms
51,840 KB
testcase_03 AC 38 ms
52,864 KB
testcase_04 AC 38 ms
52,736 KB
testcase_05 AC 36 ms
52,224 KB
testcase_06 AC 37 ms
51,840 KB
testcase_07 AC 38 ms
51,840 KB
testcase_08 AC 38 ms
52,352 KB
testcase_09 AC 38 ms
52,352 KB
testcase_10 AC 41 ms
51,968 KB
testcase_11 AC 38 ms
52,480 KB
testcase_12 AC 37 ms
52,480 KB
testcase_13 AC 309 ms
76,672 KB
testcase_14 AC 282 ms
76,416 KB
testcase_15 AC 459 ms
77,276 KB
testcase_16 AC 137 ms
76,288 KB
testcase_17 AC 249 ms
76,672 KB
testcase_18 AC 183 ms
76,288 KB
testcase_19 AC 159 ms
76,432 KB
testcase_20 AC 470 ms
76,928 KB
testcase_21 AC 258 ms
76,512 KB
testcase_22 AC 215 ms
76,344 KB
testcase_23 AC 994 ms
77,404 KB
testcase_24 AC 985 ms
77,484 KB
testcase_25 AC 1,600 ms
78,080 KB
testcase_26 AC 883 ms
77,348 KB
testcase_27 AC 1,497 ms
77,856 KB
testcase_28 AC 1,454 ms
77,824 KB
testcase_29 AC 925 ms
77,276 KB
testcase_30 AC 945 ms
77,184 KB
testcase_31 AC 1,489 ms
78,080 KB
testcase_32 AC 1,245 ms
77,808 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 = sli[l:r+1]
    #print(tmp)
    #for j in range(r-l+1):
    #    tmp.append(sli[l+j])
    tmp.sort()
    print(chr(tmp[x]))
0