結果

問題 No.1471 Sort Queries
ユーザー abc3abc3
提出日時 2021-04-09 23:02:05
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 790 bytes
コンパイル時間 2,185 ms
コンパイル使用メモリ 203,212 KB
実行使用メモリ 7,816 KB
最終ジャッジ日時 2023-09-07 12:43:18
合計ジャッジ時間 11,900 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 2 ms
4,380 KB
testcase_13 AC 100 ms
4,380 KB
testcase_14 AC 85 ms
4,376 KB
testcase_15 AC 160 ms
4,380 KB
testcase_16 AC 33 ms
4,376 KB
testcase_17 AC 70 ms
4,380 KB
testcase_18 AC 46 ms
4,376 KB
testcase_19 AC 43 ms
4,376 KB
testcase_20 AC 165 ms
4,380 KB
testcase_21 AC 77 ms
4,376 KB
testcase_22 AC 61 ms
4,380 KB
testcase_23 AC 361 ms
4,380 KB
testcase_24 AC 355 ms
4,376 KB
testcase_25 AC 585 ms
4,376 KB
testcase_26 AC 314 ms
4,376 KB
testcase_27 AC 532 ms
4,380 KB
testcase_28 AC 526 ms
4,380 KB
testcase_29 AC 311 ms
4,380 KB
testcase_30 AC 339 ms
4,380 KB
testcase_31 AC 548 ms
4,384 KB
testcase_32 AC 457 ms
4,380 KB
testcase_33 TLE -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

    #include <bits/stdc++.h>
    using namespace std;
    #include <math.h>
    #include <iomanip>
    #include <cstdint>
    #include <string>
    #include <sstream>
    template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
    template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
    #define rep(i,n) for (int i = 0; i < (n); ++i)
    typedef long long ll;
    using P=pair<int,int>;
    const int INF=1001001001;
    const int mod=1e9+7;
    
    int main(){
      int n,q;
      string s;
      cin>>n>>q>>s;
      rep(i,q){
        int l,r,x;
        cin>>l>>r>>x;
        l--;r;x--;
        string t=s.substr(l,r-l);
        sort(t.begin(),t.end());
        cout<<t[x]<<endl;
      }
      return 0;
    }
0