結果
問題 |
No.1471 Sort Queries
|
ユーザー |
|
提出日時 | 2021-08-29 12:37:33 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 343 bytes |
コンパイル時間 | 104 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 24,448 KB |
最終ジャッジ日時 | 2024-11-22 05:00:06 |
合計ジャッジ時間 | 65,370 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 TLE * 19 |
ソースコード
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]))