結果

問題 No.1471 Sort Queries
ユーザー stngstng
提出日時 2021-08-29 12:37:42
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 343 bytes
コンパイル時間 323 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 96,640 KB
最終ジャッジ日時 2024-05-01 21:59:21
合計ジャッジ時間 12,362 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
57,728 KB
testcase_01 AC 39 ms
52,096 KB
testcase_02 AC 39 ms
51,968 KB
testcase_03 AC 52 ms
62,336 KB
testcase_04 AC 47 ms
59,648 KB
testcase_05 AC 40 ms
52,480 KB
testcase_06 AC 38 ms
52,096 KB
testcase_07 AC 41 ms
52,480 KB
testcase_08 AC 55 ms
62,848 KB
testcase_09 AC 48 ms
57,728 KB
testcase_10 AC 40 ms
52,224 KB
testcase_11 AC 41 ms
52,992 KB
testcase_12 AC 55 ms
63,744 KB
testcase_13 AC 944 ms
80,128 KB
testcase_14 AC 764 ms
79,232 KB
testcase_15 AC 1,430 ms
81,152 KB
testcase_16 AC 277 ms
77,568 KB
testcase_17 AC 657 ms
78,428 KB
testcase_18 AC 455 ms
77,916 KB
testcase_19 AC 361 ms
77,696 KB
testcase_20 AC 1,453 ms
81,920 KB
testcase_21 AC 773 ms
79,080 KB
testcase_22 AC 569 ms
77,804 KB
testcase_23 TLE -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
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):
        bisect.insort(tmp,sli[l+j])
    print(chr(tmp[x]))
0