結果

問題 No.1471 Sort Queries
ユーザー TnaTna
提出日時 2022-08-10 15:20:40
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 549 bytes
コンパイル時間 257 ms
コンパイル使用メモリ 81,488 KB
実行使用メモリ 142,088 KB
最終ジャッジ日時 2023-10-21 01:23:40
合計ジャッジ時間 19,720 ms
ジャッジサーバーID
(参考情報)
judge12 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
55,644 KB
testcase_01 AC 42 ms
55,360 KB
testcase_02 AC 41 ms
55,360 KB
testcase_03 AC 48 ms
61,432 KB
testcase_04 AC 46 ms
55,360 KB
testcase_05 AC 45 ms
55,360 KB
testcase_06 AC 42 ms
55,360 KB
testcase_07 AC 44 ms
55,360 KB
testcase_08 AC 50 ms
61,432 KB
testcase_09 AC 43 ms
55,360 KB
testcase_10 AC 44 ms
55,360 KB
testcase_11 AC 44 ms
55,360 KB
testcase_12 AC 50 ms
61,504 KB
testcase_13 AC 349 ms
79,008 KB
testcase_14 AC 314 ms
77,840 KB
testcase_15 AC 486 ms
79,072 KB
testcase_16 AC 210 ms
77,120 KB
testcase_17 AC 269 ms
77,604 KB
testcase_18 AC 211 ms
77,008 KB
testcase_19 AC 226 ms
77,808 KB
testcase_20 AC 504 ms
80,072 KB
testcase_21 AC 275 ms
77,512 KB
testcase_22 AC 247 ms
77,356 KB
testcase_23 AC 937 ms
83,948 KB
testcase_24 AC 916 ms
84,372 KB
testcase_25 AC 1,413 ms
89,336 KB
testcase_26 AC 814 ms
81,980 KB
testcase_27 AC 1,268 ms
90,620 KB
testcase_28 AC 1,275 ms
89,904 KB
testcase_29 AC 844 ms
82,472 KB
testcase_30 AC 842 ms
82,696 KB
testcase_31 AC 1,306 ms
87,636 KB
testcase_32 AC 1,196 ms
84,248 KB
testcase_33 TLE -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections

N, Q = [int(x) for x in input().split()]
S = input()
queries = [[int(x) for x in input().split()] for _ in range(Q)]
# print(queries)
for x in queries:
    string_data = S[x[0]-1:x[1]]

    # print(string_data)
    # print(list(string_data))
    # print(sorted(list(string_data)))
    # print(sorted(list(string_data))[x[2]-1])

    word = ""
    res = collections.Counter(list(string_data))
    for i, (k, v) in enumerate(sorted(res.items())):
        if i > x[2]:
            break
        word += k * v
    print(word[x[2]-1])
0