結果

問題 No.1471 Sort Queries
ユーザー NoviNovi
提出日時 2021-04-09 21:35:56
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 733 bytes
コンパイル時間 1,871 ms
コンパイル使用メモリ 170,308 KB
実行使用メモリ 8,772 KB
最終ジャッジ日時 2023-09-07 10:14:34
合計ジャッジ時間 11,481 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
8,772 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 2 ms
4,376 KB
testcase_12 AC 2 ms
4,380 KB
testcase_13 AC 96 ms
4,380 KB
testcase_14 AC 81 ms
4,380 KB
testcase_15 AC 152 ms
4,380 KB
testcase_16 AC 27 ms
4,376 KB
testcase_17 AC 67 ms
4,380 KB
testcase_18 AC 43 ms
4,380 KB
testcase_19 AC 38 ms
4,380 KB
testcase_20 AC 155 ms
4,380 KB
testcase_21 AC 72 ms
4,380 KB
testcase_22 AC 57 ms
4,380 KB
testcase_23 AC 351 ms
4,380 KB
testcase_24 AC 344 ms
4,380 KB
testcase_25 AC 571 ms
4,380 KB
testcase_26 AC 299 ms
4,380 KB
testcase_27 AC 517 ms
4,384 KB
testcase_28 AC 512 ms
4,380 KB
testcase_29 AC 300 ms
4,376 KB
testcase_30 AC 331 ms
4,380 KB
testcase_31 AC 530 ms
4,380 KB
testcase_32 AC 438 ms
4,380 KB
testcase_33 TLE -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
#define rng(i, a, b) for (int i = int(a); i < int(b); i++)
#define rep(i, b) rng(i, 0, b)
#define ALL(a) (a).begin(), (a).end()
signed main() {
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout << fixed << setprecision(20);
    int n, q;
    cin >> n >> q;
    string s;
    cin >> s;
    rep(i, q) {
        int l, r;
        cin >> l >> r;
        int x;
        cin >> x;
        x--;
        l--, r--;
        string tmp = s.substr(l, r - l + 1);
        sort(ALL(tmp));
        cout << tmp[x] << "\n";
    }
}
0